University Report: Object-Oriented Software Development, MITS4002
VerifiedAdded on  2023/03/17
|7
|1034
|90
Report
AI Summary
This report on object-oriented software development, submitted by a student, examines creational design patterns, including Builder, Prototype, Factory Method, Singleton, and Abstract Factory, and their application in software design. It then delves into the practical application of design patterns, focusing on the template pattern for computing prices and the chain of responsibility pattern for the checkout process in an online shopping system. The report also explores security design processes such as distrustful decomposition, information obscurity, input validation, and role-based access control, providing class diagrams to illustrate the concepts. The report provides a comprehensive overview of design patterns and security considerations in object-oriented software development, with references to relevant literature.

Running head: OBJECT ORIENTED SOFTWARE DEVELOPMENT
OBJECT ORIENTED SOFTWARE DEVELOPMENT
Name of the Student:
Name of the University:
Author Note:
OBJECT ORIENTED SOFTWARE DEVELOPMENT
Name of the Student:
Name of the University:
Author Note:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1OBJECT ORIENTED SOFTWARE DEVELOPMENT
Table of Contents
Answer to Question 1.................................................................................................................2
Answer to question 2..................................................................................................................3
Design problem A (compute price)........................................................................................3
Design problem B (checkout)................................................................................................4
References..................................................................................................................................5
Table of Contents
Answer to Question 1.................................................................................................................2
Answer to question 2..................................................................................................................3
Design problem A (compute price)........................................................................................3
Design problem B (checkout)................................................................................................4
References..................................................................................................................................5

2OBJECT ORIENTED SOFTWARE DEVELOPMENT
Answer to Question 1
The abstraction of the instantiation process is generally done by the creational design
patterns. Due to the creational patterns it is possible for the class to be independent of the
creation, representation and composition of the objects inside the class. The class
instantiations and objects instantiations differ in creational patterns as it uses inheritance to
instantiate other classes and uses delegation of authority to other objects in the class for
object instantiation. It makes use of smaller fundamental prototypes which could be used to
design more complex classes of the same type and instantiate them. There are five different
types of creational design patterns:
1. Builder: The builder pattern separates the construction of the complex object from its
representation so as to reuse it to create more representation by using the same
process. The builder pattern is used in applications that contain complex objects with
different parts which are independent from the object. One of the major consequence
of this pattern is to separate the code for representation and construction process.
2. Prototype: The prototype pattern is designed to simplify the creation of objects of the
same type by using a pre-defined prototype. This type of pattern is mostly used at run
time to instantiate classes with the help of dynamic loading. One consequence of
using this pattern is that is helps in specifying of new objects by changing its values.
3. Factory method: The factory method pattern is mainly used to delegate the
instantiation process to a subclass from a class. It is also called a virtual constructor.
The main use of this pattern is to help a class when it cannot anticipate the objects it
should create. One major consequence of using this pattern is it helps in connecting
parallel class hierarchies.
4. Singleton: The singleton pattern finds its use when a single instance of a class needs
to be created with full global access. The main use of this pattern is during the
creation of a single instance of a class. It is also used to extend a instance of a class
with the help of sub classing. One major consequence of using this pattern is that it
brings in more flexibility to the class operations.
5. Abstract factory: The abstract factory pattern helps in the creation of families of
related objects without stating their concrete classes. It is also called as kit. The main
use of this pattern is to help a system which is independent of its objects or classes.
Answer to Question 1
The abstraction of the instantiation process is generally done by the creational design
patterns. Due to the creational patterns it is possible for the class to be independent of the
creation, representation and composition of the objects inside the class. The class
instantiations and objects instantiations differ in creational patterns as it uses inheritance to
instantiate other classes and uses delegation of authority to other objects in the class for
object instantiation. It makes use of smaller fundamental prototypes which could be used to
design more complex classes of the same type and instantiate them. There are five different
types of creational design patterns:
1. Builder: The builder pattern separates the construction of the complex object from its
representation so as to reuse it to create more representation by using the same
process. The builder pattern is used in applications that contain complex objects with
different parts which are independent from the object. One of the major consequence
of this pattern is to separate the code for representation and construction process.
2. Prototype: The prototype pattern is designed to simplify the creation of objects of the
same type by using a pre-defined prototype. This type of pattern is mostly used at run
time to instantiate classes with the help of dynamic loading. One consequence of
using this pattern is that is helps in specifying of new objects by changing its values.
3. Factory method: The factory method pattern is mainly used to delegate the
instantiation process to a subclass from a class. It is also called a virtual constructor.
The main use of this pattern is to help a class when it cannot anticipate the objects it
should create. One major consequence of using this pattern is it helps in connecting
parallel class hierarchies.
4. Singleton: The singleton pattern finds its use when a single instance of a class needs
to be created with full global access. The main use of this pattern is during the
creation of a single instance of a class. It is also used to extend a instance of a class
with the help of sub classing. One major consequence of using this pattern is that it
brings in more flexibility to the class operations.
5. Abstract factory: The abstract factory pattern helps in the creation of families of
related objects without stating their concrete classes. It is also called as kit. The main
use of this pattern is to help a system which is independent of its objects or classes.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3OBJECT ORIENTED SOFTWARE DEVELOPMENT
One of the main usage of this pattern is that it increases the consistency in between
the product objects.
Answer to question 2
Design problem A (compute price)
1. The chosen design pattern is the template pattern which can be useful in this online
shopping system as it creates a skeleton of the system which can be used to easily
develop the system. It also provides the base algorithm with placeholders where the
subclasses are automatically implemented.
2.
3. The template design pattern helps in providing code without any code duplication.
The code reuse is high in this pattern as it makes use of inheritance instead of
composition.
4. The two security design process are:
1. Distrustful decomposition: The use of this process is that it separates each
function of the system into separate untrusting parts to lower the attack risk. The
process may increase the complexity of the system as each part will have separate set
of rules and privileges.
2. Information obscurity: The use of this process helps in hiding unnecessary and
sensitive data from the viewers by encrypting them. The pattern needs categorization
of data to perform.
One of the main usage of this pattern is that it increases the consistency in between
the product objects.
Answer to question 2
Design problem A (compute price)
1. The chosen design pattern is the template pattern which can be useful in this online
shopping system as it creates a skeleton of the system which can be used to easily
develop the system. It also provides the base algorithm with placeholders where the
subclasses are automatically implemented.
2.
3. The template design pattern helps in providing code without any code duplication.
The code reuse is high in this pattern as it makes use of inheritance instead of
composition.
4. The two security design process are:
1. Distrustful decomposition: The use of this process is that it separates each
function of the system into separate untrusting parts to lower the attack risk. The
process may increase the complexity of the system as each part will have separate set
of rules and privileges.
2. Information obscurity: The use of this process helps in hiding unnecessary and
sensitive data from the viewers by encrypting them. The pattern needs categorization
of data to perform.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4OBJECT ORIENTED SOFTWARE DEVELOPMENT
Figure 1 Compute price class diagram
Design problem B (checkout)
1. The chosen design pattern is the chain of responsibility. This pattern is applicable here
as it helps in providing references for easy navigation from one page to another during
checkout.
2.
3. The benefits of this pattern is that it adds flexibility to the object during the assigning
of responsibilities. It also permits a set of classes to act as a single class.
4. The two security design process are:
1. Input validation: This process checks whether the user input in valid for the
given part. Wrong input validation can lead to attacks on the system.
2. Role based access control: This process assigns user control of the application
based on his role which can be customer or admin. This pattern is not good for
small number of users.
Figure 1 Compute price class diagram
Design problem B (checkout)
1. The chosen design pattern is the chain of responsibility. This pattern is applicable here
as it helps in providing references for easy navigation from one page to another during
checkout.
2.
3. The benefits of this pattern is that it adds flexibility to the object during the assigning
of responsibilities. It also permits a set of classes to act as a single class.
4. The two security design process are:
1. Input validation: This process checks whether the user input in valid for the
given part. Wrong input validation can lead to attacks on the system.
2. Role based access control: This process assigns user control of the application
based on his role which can be customer or admin. This pattern is not good for
small number of users.

5OBJECT ORIENTED SOFTWARE DEVELOPMENT
Figure 2 Checkout class diagram
Figure 2 Checkout class diagram
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6OBJECT ORIENTED SOFTWARE DEVELOPMENT
References
Gamma, E., 1995. Design patterns: elements of reusable object-oriented software. Pearson
Education India.
Meacham, S., Phalp, K. and Grimm, F., 2016. Towards a Better Object-Oriented Software
Development Education Using the DCI Software Architecture. In Software Engineering
Education Going Agile (pp. 113-121). Springer, Cham.
Smith, B., 2011. Object-oriented programming. In AdvancED ActionScript 3.0: Design
Patterns (pp. 1-25). Apress.
Tian, C., Nagoya, F., Liu, S. and Duan, Z. eds., 2018. Structured Object-Oriented Formal
Language and Method. Springer International Publishing.
References
Gamma, E., 1995. Design patterns: elements of reusable object-oriented software. Pearson
Education India.
Meacham, S., Phalp, K. and Grimm, F., 2016. Towards a Better Object-Oriented Software
Development Education Using the DCI Software Architecture. In Software Engineering
Education Going Agile (pp. 113-121). Springer, Cham.
Smith, B., 2011. Object-oriented programming. In AdvancED ActionScript 3.0: Design
Patterns (pp. 1-25). Apress.
Tian, C., Nagoya, F., Liu, S. and Duan, Z. eds., 2018. Structured Object-Oriented Formal
Language and Method. Springer International Publishing.
1 out of 7
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
 +13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024  |  Zucol Services PVT LTD  |  All rights reserved.