MITS4002 Object-Oriented Software Development Report

Verified

Added on  2025/05/02

|12
|1179
|457
AI Summary
Desklib provides solved assignments and past papers to help students succeed.
Document Page
MITS4002
OBJECT-ORIENTED SOFTWARE
DEVELOPMENT
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of Contents
Introduction......................................................................................................................................3
Question 1........................................................................................................................................4
Question 2........................................................................................................................................7
A..................................................................................................................................................7
B...................................................................................................................................................7
C...................................................................................................................................................7
D..................................................................................................................................................7
Conclusion.......................................................................................................................................9
Table of Figures
Figure 1: Singleton pattern example................................................................................................4
Figure 2: Factory Method Design Pattern.......................................................................................5
Figure 3: builder design pattern.......................................................................................................5
Figure 4: Abstract method pattern...................................................................................................6
Figure 5: Prototype pattern..............................................................................................................6
Figure 6: Class Diagram for checkout class....................................................................................8
Figure 7: class diagram for computeprice class...............................................................................9
1
Document Page
Introduction
This report provides detailed information related to the Creational design pattern. This report
also provides a detailed description of all the application of creational design pattern. This report
provides a detailed implementation of the best suitable design pattern to resolve the problem of
iChipKart system. This report also provides detailed information of various merits and demerits
related to the security aspects of the system or to the functionality of the system.
2
Document Page
Question 1
Creational Design Pattern provides various ways that are concerned with creating objects for the
program. This pattern is considered while creating objects at the time of the creation of the class.
This design pattern provides a suitable and most effective mechanism to design and finalize
objects to any class in java. This design pattern helps in to minimize the complexity occurs while
finalizing the objects for the classes in a very controlled environment (Baeldung, 2019).
This design pattern helps to reduce the issue occurred while any new object is being created that
usually scatters the state of an object with their properties. This mostly harms the flow of the
program. The Creational design pattern uses a decoupling technique that eliminated the client
from making changes to the actual initialization process of the program (javatpoint, 2019).
Creating Design Pattern offers various applications of have various types depends on the uses
and requirements of the program. Such as:
1. Singleton Design Pattern:
These design patterns provide the designing and creation of the only an object in the
complete instance of JVM. This is one of the simplest methods of creating an object to
the class and provide the facility of access the created object with initializing it with the
class.
Implementation:
Figure 1: Singleton pattern example
2. Factory Method Design Pattern:
This design pattern is used to provide a platform that provides the functionality of
creating an object in the supper class and also provides the functionality and feature to
manipulate their state and properties using the subclasses in a program. The Factory
method Design Pattern is also known as a virtual constructor. This method provides the
functionality of eliminating the direct call made to access the constructor of an object by
calling it through the factory method.
3
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Implementation:
Figure 2: Factory Method Design Pattern
3. Builder Design Pattern:
This design pattern provides the features and functionality of initializing and creating an
object for a class in a step by step manner. This pattern provides the allowance to create
multiple objects with the same representation using the same set of code
(Refactoring.guru, 2019).
Implementation:
Figure 3: builder design pattern
4. Abstract factory Design pattern:
This design pattern provides the functionality and feature of creating a hierarchy of object
using the concept of object creation using in the factory method. This pattern can also be
understood as it is used to create a factory object of a factory object.
Implementation:
4
Document Page
Figure 4: Abstract method pattern
5. Prototype Design Pattern:
This design pattern is used where the minimal cost of an object is the main consideration.
This pattern helps in to minimize the cost occurred while creating an object of a class in
the program.
Implementation:
Figure 5: Prototype pattern
5
Document Page
Question 2.
A
Online shopping system is one of the most popular applications that usually require a high-end
platform. The iChipKart system provides the implication of a suitable design pattern to design
effective and efficient object to perform suitable tasks.
Over the current problem arrives while defining objects of computer price class and check out
class it is suggested to choose factory method design pattern. As this method provides the
functionality to manipulate the state and properties of an object using the subclasses that are
created in the superclass.
This is the most suitable design pattern as there would be various situations where there would
be required to change the state of the object to perform a certain operation such as cancel order
and more. These kinds of functionality can only be completed by the implementation of the
factory method design pattern (Stack Abuse, 2019).
6
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
B
Modified UML diagram for checkout class:
Figure 6: Class Diagram for checkout class
Modified UML class diagram for computeprice class:
7
Document Page
Figure 7: class diagram for computeprice class
C
As per the implementation of the factory method, design pattern implicates various benefits for
the iChipKart system. The basic and most important benefit of the implementation of the factory
method design pattern are:
1. Factory method design pattern focuses on the creation of code interface approach apart
from the implementation of code directly into the program. This helps to make the
program more efficient and effective in any system.
2. Factory method design pattern sets up an environment that eliminates the creation and
initialization of objects over the client or users end. This helps to make the code and
program more robust in nature.
8
Document Page
D
The two-security design pattern for the iChipKart system are:
1. Reusability:
This security design pattern provides the accessibility of code over the multiple platforms
without changing the code.
Merits:
a. This helps to reduce the efforts of writing the same code multiple times.
b. This helps to reduce of cost of production (HowToDoInJava, 2019).
De-Merits:
a. This may create various loopholes that can produce security threats in the system.
b. This can produce various malfunction at the time of runtime of the software.
2. Completeness:
This pattern provides the description of a security pattern that would be used in the code
to implement the security of the system.
Merits:
a. This provides a clear and clean presentation of code.
b. This helps to easily identify any faults in the codes.
De-Merits:
a. This makes it very hard to resolve any issue as the complete code was already
completed.
b. This makes very hard to implement any new security measure control in the code.
9
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Conclusion
This report had provided detailed information about the creative design pattern. This report had
provided a detailed description of various security patterns with their merits and demerits for the
iChipkart system. This report had also provided the presentation of UML class diagram for the
checkout and computeprice class of the system.
10
Document Page
References
Baeldung. 2019. Introduction to Creational Design Patterns | Baeldung. [online] Available at:
https://www.baeldung.com/creational-design-patterns [Accessed 9 May 2019].
javatpoint. 2019. Builder Design Pattern - Javatpoint. [online] Available at:
https://www.javatpoint.com/builder-design-pattern [Accessed 9 May 2019].
Refactoring.guru. 2019. Structural Design Patterns. [online] Available at:
https://refactoring.guru/design-patterns/structural-patterns [Accessed 9 May 2019].
Stack Abuse. 2019. Creational Design Patterns in Java. [online] Available at:
https://stackabuse.com/creational-design-patterns-in-java/ [Accessed 9 May 2019].
HowToDoInJava. 2019. Java Factory Pattern Explained - HowToDoInJava. [online] Available
at: https://howtodoinjava.com/design-patterns/creational/implementing-factory-design-pattern-
in-java/ [Accessed 9 May 2019].
11
chevron_up_icon
1 out of 12
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]