























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 20: Advanced Programming Submission date 6/23/2022 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Mai Tran Tuan Anh Student ID GCD Class GCD0904 Assessor name Pham Thanh Son 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 Tuan Anh Grading grid P1 P2 M1 M2 D1 D
Grade: Assessor Signature: Date: Lecturer Signature:
Figure 16: Example of directed association................................................................................................................... Error! Bookmark not defined. Figure 17: Example of reflexive association................................................................................................................... Error! Bookmark not defined. Figure 21: Example of inheritance / generalization....................................................................................................... Error! Bookmark not defined.
Figure 1 : Example of OOP
mechanism, and it inherits the parent class's fields and functions. The parent class's methods and values can be readily overridden. The features of one class can be inherited by another class by expanding the class through inheritance. Productivity: The adoption of Object-Oriented Programming boosts the productivity of two codes. This is because the OOP has made new programs more accessible by providing so many libraries. Additionally, because it allows for code reuse, the length of a code is reduced, allowing for speedier development of newer codes and programs. Data redundancy: The term data redundancy refers to the fact that information is duplicated twice. This signifies that the same data appears multiple times. Data redundancy is considered a benefit in Object-Oriented Deprogramming. The user, for example, needs a feature that is comparable to practically all of the classes. In such circumstances, the user can build classes that have comparable functionality and inherit them as needed. Code flexibility: Polymorphism is a notion that allows for flexibility. For a better understanding of the concept, imagine a situation. There are many types of different shapes and each shape have its own way to calculate the area. In this case, it can be shown that when the shapes change, the way too calculate the area is changed as well. This could help to clarify the concept of polymorphism as well as its adaptability. Polymorphism benefits developers in the following ways: simplicity and extensibility.
variables; these data members and member functions together define the properties and behavior of the objects in a Class. Basically, a Class is a blueprint that represents a collection of objects that share some common features and behaviors
2.2 Objects
(functions or methods). In computer science, a class is an example of encapsulation since it consists of data and procedures that have been bundled into a single unit.
Figure 8 : Create object and use function
2.5 Inheritance
Figure 13 : Class Hinhhoc
3. Class relationship