logo

Object Oriented Software Development

7 Pages1021 Words93 Views
   

Added on  2023-03-17

About This Document

This document discusses the concept of object-oriented software development and explores creational design patterns, such as abstract factory, builder, factory method, prototype, and singleton. It also covers the proxy design pattern and its application in the compute price process, as well as the composite design pattern and its use in the checkout process. References are provided for further reading.

Object Oriented Software Development

   Added on 2023-03-17

ShareRelated Documents
Running head: OBJECT ORIENTED SOFTWARE DEVELOPMENT
OBJECT ORIENTED SOFTWARE DEVELOPMENT
Name of the Student:
Name of the University:
Author Note:
Object Oriented Software Development_1
1OBJECT ORIENTED SOFTWARE DEVELOPMENT
Table of Contents
Question 1..................................................................................................................................2
Question 2..................................................................................................................................3
Design Problem 1 (Compute Price):......................................................................................3
Design Problem 2 (Checkout):...............................................................................................4
References..................................................................................................................................6
Object Oriented Software Development_2
2OBJECT ORIENTED SOFTWARE DEVELOPMENT
Question 1
The creational design patterns are used to abstract the instantiation process. This allows the
system to be independent of the creation, composition and representation of the objects in a
class. The creational patterns uses inheritance to create different instantiations of the class
and delegates the instantiation to another object in case of object instantiation. The use of the
creational design pattern shifts the focus towards a smaller group of fundamental behaviours
which repeats over time. This set of fundamental behaviours can be used to tackle more
complex classes and instantiate them. The five main types of creational design patterns are:
1. Abstract factory: It is used to provide a medium for creating the families of
dependent or related objects without mentioning their concrete classes. It is also
known as kit. The abstract factory is used when a system is independent of its
products, is configured with multiple families of its products, is needed to enforce a
group of related product objects and is needed to reveal the interfaces of a class
library of products. One of its main consequence is the isolation of the concrete
classes.
2. Builder: It is used to separate the complex object’s construction from its
representation so that the same process can be used to create many representations.
The builder pattern is used when the algorithm that is creating the complex object is
independent of the parts of the object and its assembling and the construction process
gives permission for creating multiple representations. Its main consequence is that it
lets the user differ the product’s internal representation.
3. Factory method: This method is used to defer the instantiation process from a class
to a subclass. It is also known as the virtual constructor. It is used when a class cannot
predict the class of objects it should create and when a class the subclasses needs to
mention the object it creates. Its main consequence is that it provide hooks for
subclasses.
4. Prototype: This pattern is used to create objects with a help of a pre created prototype
by copying this prototype. It is used when classes are instantiated at run time through
dynamic loading and when an instance of a class can have only a few combinations.
The main consequence of this pattern is the removing or adding of products at
runtime.
Object Oriented Software Development_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Object Oriented Software Development
|7
|1034
|90

Object Oriented Software Development
|10
|2054
|50

Object Oriented Software Development
|11
|2016
|72

Design Pattern | Interfaces and Objects
|5
|1267
|11

Object Oriented Design Patterns in Java
|15
|2645
|493

Victorian Institute Of Technology - VIT Intro
|5
|831
|15