Escolar Documentos
Profissional Documentos
Cultura Documentos
Hand In Date
Name
Student ID
TP028092
Lecturers Name
Contents
1.0 Introduction.......................................................................................................... 3
1.1 Use Case Diagram................................................................................................ 4
2.0 Use Case Specifications........................................................................................ 5
Order Class Diagram............................................................................................... 5
Invoice Class Diagram............................................................................................. 5
Engineer Class Diagram.......................................................................................... 6
Customer Class Diagram......................................................................................... 6
3.0 System Implementation....................................................................................... 7
Classes and Objects................................................................................................ 7
Inheritance.............................................................................................................. 7
4.0 User Interface....................................................................................................... 8
4.1 Admin Login...................................................................................................... 8
5.0 Object Oriented Concepts..................................................................................11
5.1 Objects............................................................................................................... 11
5.2 Classes............................................................................................................... 12
5.3 Inheritance......................................................................................................... 12
5.4 Encapsulation..................................................................................................... 13
5.5 Advantages of using Object Oriented Programming...........................................14
6.0 Conclusion.......................................................................................................... 14
1.0 Introduction
INSPECT-RICALS is an electrical contracting company whose business areas involve domestic
electrical wiring and installation services. The firm provides installation and inspection services
of wiring and electricity circuits within an apartment or condominium. Hence, the firm requires a
system to help record customer details, assign tasks, generate invoices and other fields that the
company sees fit.
In this system, there are four types of login classifications, mainly administrator, managers,
clerks and engineers. Each has different accessibility and user management functions depending
on the type of user that is logged in. Each user is to his or her own account and has an equal
share in responsibility in the company.
In the documentation, Object Oriented Programming Concepts will be explained, accompanied
with sample codes that will be used in the system. UML diagrams such as class diagrams and use
case diagrams will be shown in the documentation for more thorough explanation and data
representation.
Based on the use case diagram as shown above, there are four actors or users that are involved
in the Electrical Installation and Inspection Management System directly, which are
administrator, clerk, manager and engineer. There is generalization in relationships between
actors, as shown in the manager actor, who inherits his functions from the admin actor.
Inheritance
5.1 Objects
Objects are based off models or a concept similar to real life. Each real life object has its own
characteristics and behaviors, examples being humans who are not identical, despite maybe
having similar surnames.
Objects in Object Oriented Programming are similar to that. The only difference being that
objects in OOP are abstract and non-existent, but they still can be used to simulate real life
features in a system.
An object that has many occurrences can be written once, and then duplicated, making OOP
favoured because the written code can be reused or altered to be used in another system or
function.
5.2 Classes
In Object Oriented Programming, a class is a collection of objects that have the same common
properties. Every object must be specified to a class. The main purpose of a class is to provide
structure for objects created in the system, as all objects have shape, meaning they are set values
that can represent something in the real life if group together.
A class has mainly two parts, mainly the header and the body. The class header will always
include the word class in the hardcodes followed by the name of the class, which can be named
as the user sees fit. This is to help differentiate and identify classes and their properties.
5.3 Inheritance
Inheritance is the extension of one class by another class. In the process, the
inheriting class obtains all data and information as well as the methods from the
parent class, also known as the super class. The child class can redefine functions it
has inherited from its parent class.
Each
only
class,
class
classes.
using
coding
of code
class
the
makes
lot
code is
times.
5.4 Encapsulation
Encapsulation is the method of packing functions and data types into a single component, hence
the term encapsulation. In programming terms, encapsulation is packing functions and data types
to secure its integrity. Encapsulation has three different security levels, namely private, protected
and public.
Encapsulation is used in the declaration of a private class. Once a class is declared private, it is
not accessible by anyone outside the class. The access of the private class can only be done by
using public methods or class constructors. This method is also known as data hiding.
For protected encapsulation, only a set number of classes and classes inheriting from said class is
able to access the data and functions in that class, whereas in public, any function can access the
class.
The benefits of using encapsulation include anonymity when modifying case sensitive objects,
such as ID and password of a system. Encapsulation also provides security as private classes
cannot be accessed and altered by third party members.
6.0 Conclusion
There is plenty to learn from completing this assignment. One of the main concepts is object
oriented programming, with samples such as encapsulation and inheritance. By using a GUI
interface it makes the system so much more usable and understandable. Programmers are able to
focus on the design of a system to give the user a better sense of understanding on how a system
works.
In conclusion, object oriented is easier to develop and has better GUI applications. It is worth
leaning and applying to a system whether large scale or smaller scale.