Assignment 1 Front Sheet: Qualification BTEC Level 5 HND Diploma in Computing
Assignment 1 Front Sheet: Qualification BTEC Level 5 HND Diploma in Computing
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.
Grading grid
P1 P2 M1 M2 D1 D2
Summative Feedback: Resubmission Feedback:
Classes and objects are the basic principles of object-oriented programming that frequently occur in real life. A class is like a constructor of an
entity or a model to build an entity. As always, a class is identified by a class name, and surrounded by curly braces. Below is a photo of my code
which declares a class name People
Figure 2 objects
1.3. ClassDiagram.
Figure 3 Class diagram of People
2. Abstraction
Abstraction means allowing the display of relevant information to achieve the level of abstraction desired. People sometimes use abstract classes
in c # for abstraction. By deriving from it, you can construct abstract classes which are used to provide partial class implementation of the
interface. And, eventually, derived classes can incorporate abstract classes in abstract methods. Additionally, some primary abstraction points are
as follows:
4. Inheritance
4.1. Definition of Inheritance:
Inheritance is one of the key principles of object-oriented programming, as it allows one class to be described in the context of another. It leads
enable faster reuse of tasks and speed up execution times.
We are not going to need to rewrite new data, we can specify that class will inherit existing class members. The new class is considered a
derivative class, and the current one is considered a base one
Figure 13 Class Smartphone
Figure 14 Class smartphone' method
Figure 15 Class nokia
Figure 16 Xiaomi class
Figure 17 Iphone class
Figure 18 Program
Polymorphism means a whole lot of forms. Through object-oriented programming, several different functions express polymorphism in the
form of an interface. Besides, polymorphism can be either static or dynamic. Static polymorphism is a answer to the compile time rule, while
dynamic polymorphism is decided at runtime
5.1.1. Overload
Figure 19 Diagram of overload
5.2. Override
When you want to implement the virtual function in an inheritance class which has a predefined function, you just need to use it. Virtual
functions in various inheritance classes can be implemented differently, and the command will be calculated at runtime.
Combining a member of the data and a method into one unit (i.e., a class) is called encapsulation. The packaging is like I got a bag that could hold
books and notebooks. That means this is the property of the members and functions being packed.
Packed in container like sackcloth. Activities and data relating to an object are followed into that object.
The package uses the access to execute defined. An access specifier which identifies the class members domain and visibility. Indications of the
link are:
- Public
- Private
- Protected
- Internal
- Protected internal
6.2. Public
6.2.1. Diagram of public
6.3. Private
Figure 24 Program
6.4. Diagram of tonghaiso
6.5. Protected,
Figure 28 Program