0% found this document useful (0 votes)
172 views15 pages

1651 - GCS200275 - Assignment 1

This document discusses object-oriented programming (OOP) concepts including characteristics, structure, and principles. It defines OOP as an approach that centers on data objects rather than functions and logic. The key components of OOP are described as classes, objects, methods, and attributes. Classes act as blueprints for objects and define their data and behaviors through methods and attributes. The main principles of OOP are encapsulation, which hides an object's internal state and implementation, inheritance which establishes a parent-child relationship between classes, and polymorphism which allows different classes to have similarly named methods that vary in behavior.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
172 views15 pages

1651 - GCS200275 - Assignment 1

This document discusses object-oriented programming (OOP) concepts including characteristics, structure, and principles. It defines OOP as an approach that centers on data objects rather than functions and logic. The key components of OOP are described as classes, objects, methods, and attributes. Classes act as blueprints for objects and define their data and behaviors through methods and attributes. The main principles of OOP are encapsulation, which hides an object's internal state and implementation, inheritance which establishes a parent-child relationship between classes, and polymorphism which allows different classes to have similarly named methods that vary in behavior.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Higher Nationals in Computing

Unit 19: Advanced Programming


ASSIGNMENT 1

Assessor name: LE NGOC THANH

Learner’s name: TRAN DUC MINH NHAT

ID: GCS200275

Class: GCS0905b

Subject code: 1651

Assignment due: Assignment submitted:


ASSIGNMENT 2 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 19: Data Structures and Algorithms

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Tran Duc Minh Nhat Student ID GCS200275

Class GCS0905b Assessor name LE NGOC THANH

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

Grading grid

P4 P5 P6 P7 M4 M5 D3 D4
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:


ASSIGNMENT 1 BRIEF
Qualification BTEC Level 5 HND Diploma in Computing

Unit number Unit 20: Advanced Programming

Assignment title Examine and design solutions with OOP and Design Patterns

Academic Year 2022

Unit Tutor LE NGOC THANH

Issue date Submission date

Submission Format:

Format: The submission is in the form of a group written report. This should be written in a concise,
formal business style using single spacing and font size 12. You are required to make use of
headings, paragraphs and subsections as appropriate, and all work must be supported with
research and referenced using the Harvard referencing system. Please also provide a
bibliography using the Harvard referencing system.
Submission Students are compulsory to submit the assignment in due date and in a way requested by the
Tutors. The form of submission will be a soft copy in PDF posted on corresponding course of
http://cms.greenwich.edu.vn/
Note: The Assignment must be your own work, and not copied by or from another student or from
books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you
must reference your sources, using the Harvard style. Make sure that you know how to reference properly,
and that understand the guidelines on plagiarism. If you do not, you definitely get fail

Assignment Brief and Guidance:

Scenario: You have recently joined a software development company to help improve their
documentation of their in-houses software libraries which were developed with very poor
documentation. As a result, it has been very difficult for the company to utilise their code in multiple
projects due to poor documentation. Your role is to alleviate this situation by showing the efficient of
UML diagrams in OOAD and Design Patterns in usages.

Tasks
You and your team need to explain characteristics of Object-oriented programming paradigm by
applying Object-oriented analysis and design on a given (assumed) scenario. The scenario can be small

Page |1
but should be able to presents various characteristics of OOP (such as: encapsulation, inheritance,
polymorphism, override, overload, etc.).
The second task is to introduce some design patterns (including 3 types: creational, structural and
behavioral) to audience by giving real case scenarios, corresponding patterns illustrated by UML class
diagrams.
To summarize, you should analyze the relationship between the object-orientated paradigm and design
patterns.

The presentation should be about approximately 20-30 minutes and it should be summarized of the team
report.

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO1 Examine the key components related to the object-orientated programming paradigm,
analysing design pattern types

P1 Examine the M1 Determine a design pattern D1 Analyse the relationship


characteristics of the object- from each of the creational, between the object-orientated
orientated paradigm as well structural and behavioural paradigm and design patterns.
as the various class pattern types.
relationships.

LO2 Design a series of UML class diagrams

P2 Design and build class M2 Define class diagrams for D2 Define/refine class
diagrams using a UML tool. specific design patterns using a diagrams derived from a given
UML tool. code scenario using a UML tool.

Page |2
Table of Contents
Unit 19: Advanced Programming ASSIGNMENT 1 ................................................................................................ 1
P1. Examine the characteristics of the object-orientated paradigm as well as the various class relationships. ........ 4
1. Denifition: ......................................................................................................................................................... 4
2. The structure of object-oriented programming ................................................................................................. 4
3. The main principles of OOP ............................................................................................................................. 5
P2. Design and build class diagrams using a UML tool. .......................................................................................... 7
1. OOP scenario .................................................................................................................................................... 7
2. Usecase Diagram .............................................................................................................................................. 7
3. Class diagram.................................................................................................................................................... 8
4. Conclution....................................................................................................................................................... 11
REFERENCES ....................................................................................................................................................... 12

Page |3
P1. Examine the characteristics of the object-orientated paradigm as well as the
various class relationships.
1. Denifition:

OOP, or object-oriented programming is an approach to computer programming that centers the creation
of software around data or objects rather than on functions and logic. An object is a data field with
particular characteristics and behavior.

OOP places more emphasis on the objects that programmers desire to handle than on the logic necessary
to do so. Large, sophisticated, and actively updated or maintained applications are a good fit for this kind
of development. This encompasses mobile apps as well as design and production software. OOP, for
instance, may be applied to manufacturing system simulation software.

An object's class, which indicates the kind of data it contains and any logical sequences it may be used
with, is assigned to it once it is understood. An individual string of logic is referred to as a method. Objects
having well defined interfaces that may communicate are referred to as messages.

2. The structure of object-oriented programming


The structure, or building blocks, of object-oriented programming include the following:
• Classes are user-defined data types that act as the blueprint for individual objects, attributes and
methods.
• Objects are instances of a class created with specifically defined data. Objects can correspond to real-
world objects or an abstract entity. When class is defined initially, the description is the only object
that is defined.

Page |4
• Methods are functions that are defined inside a class that describe the behaviors of an object. Each
method contained in class definitions starts with a reference to an instance object. Additionally, the
subroutines contained in an object are called instance methods. Programmers use methods for
reusability or keeping functionality encapsulated inside one object at a time.
• Attributes are defined in the class template and represent the state of an object. Objects will have data
stored in the attributes field. Class attributes belong to the class itself.
3. The main principles of OOP
Object-oriented programming is based on the following principles:
• Encapsulation:

This principle states that all important information is contained inside an object and only select
information is exposed. The implementation and state of each object are privately held inside a
defined class. Other objects do not have access to this class or the authority to make changes. They
are only able to call a list of public functions or methods. This characteristic of data hiding provides
greater program security and avoids unintended data corruption.

• Abstraction:

Objects only reveal internal mechanisms that are relevant for the use of other objects, hiding any
unnecessary implementation code. The derived class can have its functionality extended. This
concept can help developers more easily make additional changes or additions over time.
Page |5
• Inheritance:

Classes can reuse code from other classes. Relationships and subclasses between objects can be
assigned, enabling developers to reuse common logic while still maintaining a unique hierarchy. This
property of OOP forces a more thorough data analysis, reduces development time and ensures a higher
level of accuracy.
• Polymorphism:

Objects are designed to share behaviors and they can take on more than one form. The program will
determine which meaning or usage is necessary for each execution of that object from a parent class,
reducing the need to duplicate code. A child class is then created, which extends the functionality of
the parent class. Polymorphism allows different types of objects to pass through the same interface.

Page |6
P2. Design and build class diagrams using a UML tool.
1. OOP scenario
The University of Greenwich has a project for the IT company where I work. Because the school's E-
library management system is now outdated. They found a way to design a management software solution
to replace manual management and help the E-library manage e-book more efficiently. I did tasked with
designing the system and creating UML diagrams for Management System of the University of
Greenwich.
System Functions:
- Add new E-book
- Delete E-book
- Look up E-book informations
The Requirements:
- Any library member can search for e-books by title or ID.
- Each book will have an ID to make searching and retrieving information easier
- The system should be simple so that everyone can use it
- Allow members to download e-books
2. Usecase Diagram

➢ Users can register with the program, use it, and search for information on the eBook. Employees
are responsible for managing eBook data and have access to functions including searching, adding,
removing and updating eBooks and user data that the user does not have. In addition, the program
can also store user information for managers to conveniently control.
Page |7
➢ Functions for Staff:
- Add new E-book
- Delete E-book
- Look up E-book informations
- Update e-book
➢ Functions for Users:
- Users can look up E-book information
- Users can download e-book

3. Class diagram

This system has 6 class: Staff, User, Book, Catagolue.


We must create connection diagrams (shown in the image) to identify and help identify the relationships
of the connected items a logic, and easy to govern, in order to link these things together in a logical
sequence.

Page |8
➢ Inheritance here is shown through class Catagolue. Book class is a parent of class Catagolue, so
class Catagolue inherit properties of class Book.

Class Catagolue is used to save information about Book Class:

Catagolue class and Book are connected by directed association. The process of determining the
kind of Book will then have its own features and methods for simple administration because this
object is inherited from the Book class.

Page |9
➢ By encapsulating properties and methods in the same class, encapsulation is illustrated. Modifiers
like public and private access modifiers are available for staff and user classes.The Viewinfo()
method of the Member class is overridden by the Students and Teachers classes. In Object oriented
Programming, this is known as Polymorphism.

➢ The main purpose of abstraction is to hide unnecessary details from the user. Abstraction is
selecting data from a larger pool to show only relevant details of the object to the user. It helps
to reduce programming complexity and effort. For example, in the Book class, it will display the
book's information such as author name, book title, etc without showing delete and add books to
Catagolue.

P a g e | 10
4. Conclution
I've already shown how UML diagrams in OOP and design patterns may be used to eliminate shoddy
documentation, so I'll do it again. Several well-known programming languages, including Java, C++,
Python, JavaScript, and C#, use this methodology. Because OOP makes it simple to consider classes and
their relationships, developers frequently utilize it as a tool for designing complex applications. By
constructing collections of classes that represent and enclose things in a program, classes may be arranged
into modules. This enhances the organization and structure of software programs.
We reach the following findings after concluding the report's content: define, summarize, create a class
diagram for each feature, and determine that each feature produces four OOP features. There are three
types of design patterns: creative, structural, and behavioral. It is commonly known how design patterns
and OOP relate to one another.

P a g e | 11
REFERENCES
• Alexander S. Gillis. OOP. Available at:
https://www.techtarget.com/searchapparchitecture/definition/object-oriented-programming-OOP
[Accessed December 4, 2022].
• Tutorialspoint, What is OOP? Available at:
https://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_paradigm.ht
m [Accessed December 4, 2022].
• Polymorphism, Encapsulation, Data Abstraction and Inheritance in OOP. Available at:
https://www.nerd.vision/post/polymorphism-encapsulation-data-abstraction-and-inheritance-in-
object-oriented-programming [Accessed December 4, 2022].
• Dharshani Ranasoma, Class diagram for an e-library system. Available at:
https://creately.com/diagram/example/i64rely82/class-diagram-for-an-e-library-system [Accessed
December 4, 2022].
• Kyle Herrity, What Is Object-Oriented Programming? 4 Basic Concepts of OOP. Available at: What
Is Object-Oriented Programming? 4 Basic Concepts of OOP | Indeed.com [Accessed December 4, 2022].
• Wikipedia, Object-oriented programming. Available at: Object-oriented programming - Wikipedia
[Accessed December 4, 2022].
• Kyle Herrity, 4 basic concepts of object-oriented programming. Available at:
https://www.indeed.com/career-advice/career-development/what-is-object-oriented-
programming#:~:text=Object-
oriented%20programming%20has%20four,of%20an%20OOP%20computer%20program
[Accessed December 4, 2022].
• Geeksforgeeks, Polymorphism in OOPs. Available at: https://www.geeksforgeeks.org/perl-
polymorphism-in-oops/ [Accessed December 4, 2022].
• M. Hamdi Ozdil, What is “Inheritance”? Available at: https://hamdiozdil.medium.com/what-is-
inheritance-d6b8efe4ab72 [Accessed December 4, 2022].
• Erin Doherty, What is object-oriented programming? Available at:
https://www.educative.io/blog/object-oriented-programming [Accessed December 4, 2022].

P a g e | 12

You might also like