You are on page 1of 37

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 20: Advanced Programming

Submission date 09/06/2022 Date Received 1st submission 09/06/2022

Re-submission Date Date Received 2nd submission

Student Name Vuong Khanh Thanh Student ID GDH190702

Class GCH0908 Assessor name Lê Việt Bách

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.

Student’s signature Thanh

Grading grid

P1 P2 M1 M2 D1 D2
 Summative Feedback:  Resubmission Feedback:
2.1

Grade: Assessor Signature: Date:


Lecturer Signature:
Table of Contents
I. Introduction ........................................................................................................................................................................................................... 5
II. What is OOP? ......................................................................................................................................................................................................... 5
1. Class and Object ................................................................................................................................................................................................. 6
2. Abstraction ......................................................................................................................................................................................................... 9
III. Scenario............................................................................................................................................................................................................ 14
VI. Design Patterns ................................................................................................................................................................................................... 21
1. Creational patterns .......................................................................................................................................................................................... 22
2. Structural Patterns ........................................................................................................................................................................................... 24
3. Behavior Pattern .............................................................................................................................................................................................. 26
V. Scenario Design Patterns ..................................................................................................................................................................................... 28
1.1 Builder Design Pattern for scenario (Creational Design Patterns ) ................................................................................................................ 28
1.2 Strategy Design Pattern for scenario (Behavioral Design Patterns) .............................................................................................................. 30
1.3 Adapter Design Pattern for scenario ( Structural Design Patterns)......................................................................................................... 32
VI. Design Pattern vs OOP ............................................................................................................................................................................................ 34
VII. Conclusion.............................................................................................................................................................................................................. 35
References ................................................................................................................................................................................................................... 36

Table of Figure
Figure 1-Data Abstraction ........................................................................................................................................................................................... 9
Figure 2-Example code of Data Abstraction ............................................................................................................................................................. 10
Figure 3 Encapsulation ................................................................................................................................................................................................. 11
Figure 4 Inheritance ..................................................................................................................................................................................................... 13
Figure 5 Polymorphism ................................................................................................................................................................................................ 14
Figure 6 user case ........................................................................................................................................................................................................ 16
Figure 7 Class diagram ................................................................................................................................................................................................. 20
Figure 8 Builder Design Pattern ................................................................................................................................................................................... 29
Figure 9 Strategy Design Pattern ................................................................................................................................................................................. 31
Figure 10 Adapter Design Pattern................................................................................................................................................................................ 33

List of Table
Table 1-Difference between class and object ............................................................................................................................................................. 8
Table 2 Select the character ........................................................................................................................................................................................ 17
Table 3 Select play mode ............................................................................................................................................................................................. 18
Table 4 Choose the types of billiard game ................................................................................................................................................................... 18
Table 5 Choose action in the game .............................................................................................................................................................................. 19
I. Introduction
Programming language features that are considered advanced are used for efficient software development, which can affect
the performance of the application as well as the readability and scalability of the code. Many of the commercial applications
available today, whether for work or play, will use one or more design patterns in their development. A design pattern is a
description of how to solve a problem that can be used in a variety of situations and can help deepen understanding of object-
oriented programming and help improve design and reusability. software. In this report, we will talk about OOP and design
patterns, so that readers can understand how to create effective applications, improve application performance. the goals of
the report to Understand about 4 characteristics of OOP includes: Abstraction, Encapsulation, Polymorphism and Inheritance,
Understand about OOP and Design Pattern, Understand relationship between OOP and Design Pattern.

II. What is OOP?


Object-Oriented Programming or OOPs is about creating objects that contain both data and methods. Object-oriented
programming refers to languages that use objects in programming. Object-oriented programming aims to implement real-
world entities like inheritance, hiding, polymorphism, etc in programming. The main aim of OOP is to bind together the data
and the functions that operate on them so that no other part of the code can access this data except that function
(sambhav228, 2020)

OOP (Object Oriented Programming) have four main features:


• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
Before coming to the four main features, we will introduce the fundamental building blocks of an OOP, including
• Class
• Object
• Method
• Attribute
1. Class and Object
Classes and objects are the two main aspects of object-oriented programming. A class is a template for objects, and an object is an instance
of a class. When the individual objects are created, they inherit all the variables and methods from the class.
Class

A class is an entity that determines how an object will behave and what the object will contain. In other words, it is a blueprint or a set of
instruction to build a specific type of object. It provides initial values for member variables and member functions or methods. (Martin,
2021)

The important uses of class:


• Class is used to hold both data variables and member functions.
• It enables you to create user define objects.
• Class provides a way to organize information about data.
• You can use class to inherit the property of other class.
• Classes can be used to take advantage of constructor or destructor.
• It can be used for a large amount of data and complex applications.
(Martin, 2021)
Object:
An object is nothing but a self-contained component that consists of methods and properties to make a data useful. It helps you
to determines the behavior of the class.
From a programming point of view, an object can be a data structure, a variable, or a function that has a memory location
allocated. The object is designed as class hierarchies. (Martin, 2021)

The important uses of an object:


• It helps you to know the type of message accepted and the type of returned responses.
• You can use an object to access a piece of memory using an object reference variable.
• It is used to manipulate data.
• Objects represent a real-world problem for which you are finding a solution.
• It enables data members and member functions to perform the desired task.
(Martin, 2021)
The important difference between class and object

Here is the important difference between class and object:


Class Object
A class is a template for creating
The object is an instance of a class.
objects in program.
A class is a logical entity Object is a physical entity
A class does not allocate memory Object allocates memory space
space when it is created. whenever they are created.
You can create more than one
You can declare class only once.
object using a class.
Example: Car. Example: Jaguar, BMW, Tesla, etc.
Class generates objects Objects provide life to the class.
Classes can’t be manipulated as
They can be manipulated.
they are not available in memory.
Each and every object has its own
It doesn’t have any values which
values, which are associated with
are associated with the fields.
the fields.
You can create class using “class” You can create object using “new”
keyword. keyword in Java
Table 1-Difference between class and object
2. Abstraction
Data abstraction is one of the most essential and important features of object-oriented programming. Data abstraction
refers to providing only essential information about the data to the outside world, hiding the background details or
implementation. (sambhav228, 2020)
Abstraction is the process of concealing implementation details from the user and just displaying functionality. In another
method, it merely gives the user the relevant information and hides the internal intricacies. such as when sending SMS,
where you write the text and then send the message. You are unaware of the internal message delivery processing.
Abstraction allows you to concentrate on the object's function rather than how it does it. Besides, abstract classes cannot
be instantiated and can only be used through inheritance Abstraction using Classes: Classes may be used to implement
Abstraction in programming. Using the available access specifiers, the class assists us in grouping data members and
member functions. A-Class has the ability to control which data members are visible to the outside world and which are
not.

Figure 1-Data Abstraction


Figure 2-Example code of Data Abstraction

3. Encapsulation
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the
data it manipulates. In Encapsulation, the variables or data of a class are hidden from any other class and can be accessed only
through any member function of their class in which they are declared. As in encapsulation, the data in a class is hidden from
other classes, so it is also known as data-hiding. (sambhav228, 2020)

All we need to understand is the interface that is provided for us. While abstraction addresses the characteristics of an object
from an external viewer's perspective, encapsulation focuses on the implementation of an object. Besides, the implementation
encapsulates the details about an abstraction into separate elements. The implementation should be considered a secret of the
abstraction and hidden from most clients.

For the user or another programmer:

• All that is required of the user is an understanding of the interface.


• The user is not required to comprehend how the implementation functions or was developed.

For the programmer:


• The programmer is free to alter the implementation without notifying the user. using the public, private, and protected
keywords, we may determine the extent of 'hiding' of specific methods or states within a class:
• Public methods - describe the interface.
• Private methods - describe the implementation

Figure 3 Encapsulation

4. Inheritance
Inheritance is an important pillar of OOP (Object-Oriented Programming). The capability of a class to derive properties and
characteristics from another class is called Inheritance. When we write a class, we inherit properties from other classes. So,
when we create a class, we do not need to write all the properties and functions again and again, as these can be inherited
from another class that possesses it. Inheritance allows the user to reuse the code whenever possible and reduce its
redundancy. (sambhav228, 2020)

In c# inheritance, the class whose members are inherited is called a base (parent) class and the class that inherits the members
of base (parent) class is called a derived (child) class.

Multi-Level Inheritance
Generally, c# supports only single inheritance that means a class can only inherit from one base class. However, in c# the
inheritance is transitive and it allows you to define a hierarchical inheritance for a set of types and it is called a multi-level
inheritance.

For example, suppose if class C is derived from class B, and class B is derived from class A, then the class C inherits the
members declared in both class B and class A.

Multiple Inheritance
As discussed, c# supports only single inheritance that means a class can only inherit from one base class. In case, if we try
to inherit a class from multiple base classes, then we will get a compile time error.
Figure 4 Inheritance

5. Polymorphism
The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be
displayed in more than one form. For example, A person at the same time can have different characteristics. Like a man at the same time is
a father, a husband, an employee. So, the same person possesses different behavior in different situations. This is called polymorphism.
(sambhav228, 2020)

There are two forms of polymorphism, over-riding and over-loading.

• Overloading: occurs when two or more methods in one class have the same method name but different parameters.
• Overriding: occurs when two methods have the same method name and parameters.

Moreover, polymorphism is extensively used in implementing inheritance.


Overloading Overriding
• Must have at least two methods by the same name in • Must have at least one method by the same name in
the class. both parent and child classes.
• Must have a different number of parameters. • Must have the same number of parameters.
• If the number of parameters is the same, then it must • Must have the same parameter types.
have different types of parameters. • Overriding is known as runtime polymorphism
• Overloading is known as compile-time polymorphism

Figure 5 Polymorphism

III. Scenario
There is a billiards tournaments that gather a lot of players, snooker has 2 types, Carom, Carom billiards, also known as Phang
billiards. In this game, you must hit the cue ball on both object balls and hit the boundary at least once before the second target
ball hits. If this happens, you get a point. When no marbles are hit, one point is deducted. The first player to reach the agreed
number of points is the winner. and Billiard to win you must be the first to hit 5 or 8 balls into the pocket. billiard balls will
also have different color features, billiards tables are also divided into many types. billiards has a billiard triangle used to
rearrange the billiards table. In billiards.
• Ball: The ball is an object that the player will interact with to be able to play this sport. Ball includes: color, number of
balls, ball size.
• Table: The table is where players can play billiards on top of it. Depending on the needs of the user, there will be
mainly 3 sizes of tables for 3 different billiards. The pool table consists of 6 holes, with a barrier, usually green. billiard
carom table only includes barrier tape, no ball holes. billiard snooker consists of 6 holes and barrier, same as pool table
but larger size.
• billiard sticks: is what the user will use to be able to hit the cue ball into the target marbles to get points depending on
the rules of the game. Billiard bats can vary in size and weight depending on the purpose, such as pool players will use
medium and medium length clubs, breaking marbles will use short and heavy clubs with large heads....
• Character: As someone who will play billiards, each person will have their own characteristics such as the skill level of
each separate billiard discipline, gender, hometown, ....
• Billiards Skills: is the player's technique to be able to control the cue ball at his discretion. It includes techniques such
as cule, masse, tonic.

Players enter the game, choose a table, choose a game mode, choose a stick to play, when playing, they will use a stick to hit,
depending on the player's hitting power, the ball will fly far or near.
Figure 6 user case
Table 2 Select the character

Name of Use Case: Select the character


Created By: Group 5 Last Updated By: Nguyen Tu Hai
Date Created: 30/5/2022 Last Revision 30/5/2022
Date:

Description: Players can choose from one of the available sample characters,
including their name, age, nationality, and gender.
Actors: user
Preconditions: 1. no

Postconditions: After choosing a character, there will be a pop-up window asking the
player to agree to choose the character or decline. If the player chooses
yes, they will be taken to the game's menu screen, if not, they will be
taken back to the character selection screen.
Flow: 1. open game
1. Click on character selection
1. Select the desired character
1. press the agree button
1. complete character selection
1. Takes to the game menu screen
Exceptions: no
Table 3 Select play mode

Name of Use Case: Select play mode


Created By: Group 5 Last Updated By: Nguyen Tu Hai
Date Created: 30/5/2022 Last Revision 30/5/2022
Date:

Description: Player can choose 1 player or multiplayer


Actors: user
Preconditions: After choosing the character

Postconditions: no
Flow: 1. open game
1. Click on game mode
1. Select game mode
1. press the agree button
1. complete game mode selection
Exceptions: no

Table 4 Choose the types of billiard game

Name of Use Case: Choose the types of billiard game


Created By: Group 5 Last Updated By: Nguyen Tu Hai
Date Created: 30/5/2022 Last Revision 30/5/2022
Date:

Description: Players can choose 1 of 3 types of billiards to play, that is pool, snooker,
carom
Actors: user
Preconditions: after selecting the game mode

Postconditions: no
Flow: 1. Click on continue button after selecting the game mode
1. Select type of game
1. press the agree button
1. complete choose type of game
Exceptions: no

Table 5 Choose action in the game

Name of Use Case: Choose action in the game


Created By: Group 5 Last Updated By: Nguyen Tu Hai
Date Created: 30/5/2022 Last Revision 30/5/2022
Date:

Description: After entering the game, the player can choose the actions of the
character to be able to interact with the game, such as choosing a stick,
choosing a target ball, choosing a shot force.
Actors: Librarian
Preconditions:
after choose type of game

Postconditions: no
Flow: 1. Click on continue button after choose type of game
1. Choose stick
1. Choose target ball
1. Choose shot force
1. complete
Exceptions: no
Figure 7 Class diagram
• The table will have the size and color on the tabletop, the table has two styles, Carom and Billiard Pool, depending on
the size of the table. The Pool Pool table has an additional 6 holes.
• in billiards with balls, depending on the type of game, there will be different sizes and colors, especially CaromBall has
an additional number of each ball.
• Players, in addition to hitting the ball, each player will use a stick, depending on the type of stick will have different
hitting power.

VI. Design Patterns


Introduction to Design Pattern
A design pattern provides a general reusable solution for the common problems that occur in software design. The pattern
typically shows relationships and interactions between classes or objects. The idea is to speed up the development process by
providing well-tested, proven development/design paradigms. Design patterns are programming language independent
strategies for solving a common problem. That means a design pattern represents an idea, not a particular implementation. By
using design patterns, you can make your code more flexible, reusable, and maintainable.
a pattern has four essential elements:
The pattern name: is a shorthand for describing a design challenge, its solutions, and its repercussions in a few words.
Naming a pattern expands our design language right away. It allows us to develop at a higher abstraction level.
The problem: specifies when the pattern should be used. It describes the problem and its context, as well as particular design
issues like how to express algorithms as objects. It might be used to characterize class or object structures that are indicative
of a rigid design.
The solution: explains the design's components, their interactions, responsibilities, and partnerships. Because a pattern is like
a template that may be used in a variety of scenarios, the solution does not explain a specific physical design or
implementation.
The consequences: are the outcomes and trade-offs of putting the pattern into practice. Though we seldom mention
repercussions when discussing design decisions, they are crucial for assessing design choices and comprehending the costs
and advantages of using the pattern. The repercussions for software sometimes include trade-offs in terms of space and time.
1. Creational patterns
In software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to
create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added
complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
There are some types of design pattern in Creational Design Pattern:
• Abstract Factory: Provide an interface or creating families of related or dependent objects without specifying their
concrete classes.
• Builder: Separate the construction of a complex object from its representation so that the same construction process
can create different representations.
• Factory Method: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory
Method lets a class defer instantiation to subclasses.
• Prototype: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this
prototype.
• Singleton: Ensure a class only has one instance, and provide a global point of access to it.
Builder Design Pattern
The Builder Design Pattern is another creational pattern designed to deal with the construction of comparatively complex
objects. When the complexity of creating object increases, the Builder pattern can separate out the instantiation process by
using another object (a builder) to construct the object. This builder can then be used to create many other similar
representations using a simple step-by-step approach.
When to Use Builder Pattern:
When the process involved in creating an object is extremely complex, with lots of mandatory and optional parameters
When an increase in the number of constructor parameters leads to a large list of constructors
When client expects different representations for the object that's constructed
2. Structural Patterns
Structural Design Patterns are Design Patterns that ease the design by identifying a simple way to realize relationships
between entities. Structural design patterns explain how to assemble objects and classes into larger structures, while keeping
these structures flexible and efficient.

There are some types of structural patterns:

• Adapter: Convert the interface of a class into another interface clients expect. Adapter lets classes work together that
couldn't otherwise because of incompatible interfaces.
• Bridge: Decouple an abstraction from its implementation so that the two can vary independently.
• Composite: Decouple an abstraction from its implementation so that the two can vary independently.
• Decorator: Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub
classing for extending functionality.
• Facade: Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that
makes thesubsystem easier to use

Adapter Pattern
An Adapter Pattern says that just "converts the interface of a class into another interface that a client wants". In other words,
to provide the interface according to client requirement while using the services of a class with a different interface. The
Adapter Pattern is also known as Wrapper.
Usage of Adapter Pattern
• When an object needs to utilize an existing class with an incompatible interface.
• When you want to create a reusable class that cooperates with classes which don't have compatible interfaces.
• When you want to create a reusable class that cooperates with classes which don't have compatible interfaces.
3. Behavior Pattern
Behavioral design patterns are design patterns that identify common communication patterns between objects and realize
these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
Algorithms and the assignment of responsibility amongst objects are the focus of behavioral patterns. Not only do behavioral
patterns represent patterns of objects or classes, but they also explain patterns of communication between them. Complex
control flow that is difficult to follow at run-time is characterized by these characteristics. They divert your attention away
from the flow of control, allowing you to focus just on the interconnections between items. By doing so, these patterns increase
flexibility in carrying out this communication.
List of behavioral patterns
• Chain of responsibility: A behavioral design pattern that lets you pass requests along a chain of handlers. Upon
receiving a request, each handler decides either to process the request or to pass it to the next handler in the chain.
• Iterator: A behavioral design pattern that lets you traverse elements of a collection without exposing its underlying
representation
• Command: A behavioral design pattern that turns a request into a stand-alone object that contains all information
about the request. This transformation lets you pass requests as a method argument, delay or queue a request’s
execution, and support undoable operations
• Template Method: A behavioral design pattern that defines the skeleton of an algorithm in the superclass but let
subclasses override specific steps of the algorithm without changing its structure.
• Strategy: A behavioral design pattern that lets you define a family of algorithms, put each of them into a separate class,
and make their objects interchangeable.
• Observer: A behavioral design pattern that lets you define a subscription mechanism to notify multiple objects about
any events that happen to the object they’re observing.
• Mediator: A behavioral design pattern that lets you reduce chaotic dependencies between objects. The pattern restricts
direct communications between the objects and forces them to collaborate only via a mediator object
Chain Of Responsibility Pattern
In chain of responsibility, sender sends a request to a chain of objects. The request can be handled by any object in the chain. A
Chain of Responsibility Pattern says that just "avoid coupling the sender of a request to its receiver by giving multiple objects a
chance to handle the request".
Usage of Chain Of Responsibility
• When more than one object can handle a request and the handler is unknown.
• When the group of objects that can handle the request must be specified in dynamic way
V. Scenario Design Patterns
1.1 Builder Design Pattern for scenario (Creational Design Patterns )
Program for a car manufacturing company , a car is a complicated object that can be built in a variety of ways. We
separated the car assembly code into a separate car builder class rather than bloating the Car class with a large
constructor. A set of methods for configuring various parts of a car are available in this class.

Figure 8 Builder Design Pattern

This Builder pattern illustrates how you can reuse the same object construction code when building different types of
products, such as cars, and create the corresponding manuals for them.
Builder (ICarBuilder)
Is an abstract class or interface that declares a method to create a car object.
ConcreteBuilder (CarBuilder)
Inherit the Builder and install the details of how to create cars.
Director
Build the car using ICarBuilder, which calls the Builder to create the object.
Product (Car)
represents the car object to be created, this object is complex, has many properties.
1.2 Strategy Design Pattern for scenario (Behavioral Design Patterns)
The company's competitive strategy is to create many discount times such as percentage discounts, free on certain types of
items on special occasions. The company believes that offering many discount opportunities can attract more customers for
the company.
There are 3 basic promotions:
• Free: The price of the product is 0 VND.
• Promotion based on discount percentage: Buyer selects the appropriate percentage to set the discount, which
must be greater than ten percent.
• Promotion by quantity: Customers who buy n products will get x discount
Mission is to create a system to solve this problem.

Figure 9 Strategy Design Pattern


• Product is the class that represent for all a single of products. In this class, it has several attributes such as
name, price, model, size, year, id. That information stands for the detail information of a product.
• ProductManagement is the class that represent for the type of a product. For example: Iphone 13, laptop, etc.
under electronic device or T-shirts, shorts belong to clothing. Each of type has a promotion, and it is set by the
constructor. Moreover, this class has Add, Remove and Show function to help the user add, remove or see the
product’s information.
• Whereas Promotion is another interface to decide the type of promotion. Discount is a function decide which
type of promotion should be
applied to a specific merchandise.
• FreePromotion class function to buy products for 0 VND
• PrecentPromotion class function percentage discount
• QuanityPromotion class discount function by quantity
• ByProduct the buyer chooses the product and the discount code
• AdminMenu product management

1.3 Adapter Design Pattern for scenario ( Structural Design Patterns)

Now that you have studied English outside, you have got an ielts degree. the school has not implemented a program to
exchange points or recognize ielts scores. Up we wrote this program for the purpose of helping to convert ielts points to PTE.
This will help you save time and be able to graduate on time.
Figure 10 Adapter Design Pattern

Explanation:
• PTE: table containing information about the issue date day expires and the test scores of detech students. PTE score is
an integer (int) between 0-90)
• IELTS: table contains information about date date expires and the test scores of external students study. This point
number (double) ranges from 0.0-9.0
• StudentGreenwich: Inherit the Student class and students at Greenwich will be awarded a PTE
• StudentCenter: Students who study English at IELTS centers are awarded Ielts degrees.
• Student: contains student information
• StudentAdapter: Because FPT only accepts PTE degrees to “StudentAdapter” with the goal of helping to convert IELTS
scores to PTE scores so that students at the Center do not have to retake or re study to get a PTE degree.
VI. Design Pattern vs OOP
Object Oriented programming is a programming paradigm fundamental to many programming languages. If you follow this
paradigm you use objects to approach the overall program. The objects contain data and behaviors and you connect them in
logical ways to successfully solve the task at hand.
Beside, design pattern is a tried and tested solution to a common programming pattern. It could be considered a best practice.
This solution is robust, scalable, readable and flexible. If you approach a program using an Object-Oriented paradigm, there are
a number of design patterns you can then draw on to solve specific problems.

Sometimes you have to modify a class that can't be modified conveniently. Perhaps you need the source code and don't have it
as may be the case with a commercial class library or maybe any change would require modifying lots of existing subclasses.
Design patterns offer ways to modify classes in such circumstances

The concept of Design Pattern is closely associated with Object Oriented Programing (OOP). Design patterns solve many of the
problems object-oriented. There are several of these problems and how design patterns solve them:

OOP Problem:

The hard part about object-oriented design is decomposing a system into objects. The task is difficult because many factors
come into play: encapsulation, granularity, dependency, flexibility, performance, evolution, re-usability, and on and on. They
all influence the decomposition, often in conflicting ways. Many objects in a design come from the analysis model. But object-
oriented designs often end up with classes that have no counterparts in the real world. Some of these are low-level classes like
arrays, others are much higher-level.

Using design pattern

Design patterns help you identify less-obvious abstractions and the objects that can capture them. For example: Objects that
represent a process or algorithm don't occur in nature, yet they are a crucial part of flexible designs.

The Strategy pattern describes how to implement interchangeable families of algorithms that can change the price of
products in the promotion strategy in scenario 1.2.

OOP Problem:
Objects can vary tremendously in size and number. They can represent everything down to the hardware or all the way up to
entire applications. How do we decide what should be an object in scenario 1.1 to get a complete car that can run if using OOP
alone it would be very difficult to figure out what the car needs and the configuration of the car like.

Using design pattern

Templates allow you to create different styles and representations of an object using the same construction code. from there
we make car parts easily without confusion.

VII. Conclusion
Above is our explanation of object-oriented programming, with object-oriented programming features used specifically in the
Tech Store Class Diagram example. We recognize the importance of object-oriented programming (OOP). OOP allows us to
improve productivity while simplifying the complexity of software development and system maintenance. However, this is
only one aspect of system development To create the most efficient system, we must use other design patterns, which provide
comprehensive answers to frequent difficulties in software design. This activity also presents several types of design patterns
and includes specific examples.
References
Angeliki, K. (2020). tandfonline. Retrieved 3 8, 2022, from https://www.tandfonline.com/doi/full/10.1080/15567036.2020.1831108

Barratt, H. (2018). healthknowledge. Retrieved 2 23, 2022, from https://www.healthknowledge.org.uk/public-health-textbook/research-


methods/1a-epidemiology/methods-of-sampling-population

Beal, V. (2021). webopedia. Retrieved 12 20, 2021, from https://www.webopedia.com/definitions/object-oriented-programming-oop/

Butterworth, C. (2021). thehrdirector. Retrieved 3 9, 2022, from https://www.thehrdirector.com/features/health-and-wellbeing/the-rise-of-


remote-working-whats-the-impact-on-employee-wellbeing/

qlservertutorial. (2021). Retrieved 10 10, 2021, from https://www.sqlservertutorial.net/getting-started/what-is-sql-server/

sourcemaking. (2021). Retrieved 12 21, 2021, from https://sourcemaking.com/design_patterns

Powered by TCPDF (www.tcpdf.org)


Index of comments

2.1 The report covers all sections required in this assignment. OOP general concept has some good details. APIE in OOP is discussed with examples to illustrate
concepts.

OOP scenario is clearly written with Usecase Diagram. Use cases are provided adequately. Class diagram is good and captures all details in scenario.

All 03 categories of Design Patterns: Creational, Structural and Behavioural are included in the report together with class diagrams.

Scenarios and class diagrams of Builder, Strategy are included

There are a few weaknesses in the report


APIE is should have better and longer explanation.
SOLID principles are missing.
Explanation for OOP scenario is quite short nad poor written
Scenarios and explanation of specific design patterns are quite short
Discussion on design pattern vs. OOP should have diagrams for better explanation.

Powered by TCPDF (www.tcpdf.org)

You might also like