Advance Programming: Payroll System Design and Implementation
VerifiedAdded on 2025/05/02
|23
|3325
|322
AI Summary
Desklib provides solved assignments and past papers to help students succeed.

Advance Programming
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Contents
Introduction:...............................................................................................................................3
LO1 Examine the key components related to the object-oriented programming paradigm,
analysing, design, pattern types.................................................................................................4
P1 Examine the characteristic of the object-oriented paradigm as well as the various class
relationships...........................................................................................................................4
M1 Determine a design pattern from each of the creational, structural and behavioural
pattern types...........................................................................................................................7
LO2 Design a series of UML Class diagrams............................................................................8
P2 Design and build class diagram using a UML tool...........................................................8
M2 Define class diagrams for specific design patterns using a UML tool............................9
LO3 Implement code applying design patterns.......................................................................10
P3 Build an application derived from UML class diagrams................................................10
M3 Develop code that implements a design pattern for a given purpose:...........................15
LO4 Investigate scenario with respect to design patterns........................................................18
P4 Discuss a range of design patterns with relevant examples of creational, structural and
behavioural pattern types:....................................................................................................18
M4 Reconcile the most appropriate design pattern from a range with a series given
scenarios:..............................................................................................................................21
Conclusion:..............................................................................................................................22
References................................................................................................................................23
List of figures:
Figure 1: Class............................................................................................................................4
Figure 2: Class diagram.............................................................................................................8
Figure 3: Get employee details................................................................................................10
Figure 4: Enter Employee details.............................................................................................11
Figure 5: Payroll of the employee............................................................................................11
Figure 6: Hourly Employee......................................................................................................12
Figure 7: Payroll of Employee.................................................................................................13
Figure 8: Commission employee.............................................................................................13
Figure 9: Employee Payroll.....................................................................................................14
Figure 10: All Calculation........................................................................................................15
Figure 11: Employee Details....................................................................................................16
Figure 12: Print Receipt...........................................................................................................17
Figure 13: Program..................................................................................................................17
Introduction:...............................................................................................................................3
LO1 Examine the key components related to the object-oriented programming paradigm,
analysing, design, pattern types.................................................................................................4
P1 Examine the characteristic of the object-oriented paradigm as well as the various class
relationships...........................................................................................................................4
M1 Determine a design pattern from each of the creational, structural and behavioural
pattern types...........................................................................................................................7
LO2 Design a series of UML Class diagrams............................................................................8
P2 Design and build class diagram using a UML tool...........................................................8
M2 Define class diagrams for specific design patterns using a UML tool............................9
LO3 Implement code applying design patterns.......................................................................10
P3 Build an application derived from UML class diagrams................................................10
M3 Develop code that implements a design pattern for a given purpose:...........................15
LO4 Investigate scenario with respect to design patterns........................................................18
P4 Discuss a range of design patterns with relevant examples of creational, structural and
behavioural pattern types:....................................................................................................18
M4 Reconcile the most appropriate design pattern from a range with a series given
scenarios:..............................................................................................................................21
Conclusion:..............................................................................................................................22
References................................................................................................................................23
List of figures:
Figure 1: Class............................................................................................................................4
Figure 2: Class diagram.............................................................................................................8
Figure 3: Get employee details................................................................................................10
Figure 4: Enter Employee details.............................................................................................11
Figure 5: Payroll of the employee............................................................................................11
Figure 6: Hourly Employee......................................................................................................12
Figure 7: Payroll of Employee.................................................................................................13
Figure 8: Commission employee.............................................................................................13
Figure 9: Employee Payroll.....................................................................................................14
Figure 10: All Calculation........................................................................................................15
Figure 11: Employee Details....................................................................................................16
Figure 12: Print Receipt...........................................................................................................17
Figure 13: Program..................................................................................................................17

Introduction:
A concept of object-oriented programming with using Java programs, that used to design,
implement and test a framework is known as advanced programming. The current scenario is
to write a payroll application for a recently started company that deals in the sales of
computer parts. The company has three types of employees, for which they required payroll
calculation application.
The first part of the assignment includes the concept of object-oriented programming like
abstraction, inheritance and others with analysing the design pattern types. Class diagram
with using a UML tool included in the second part of the assignment as well as code
implementation place in the third learning outcomes. Code development on a design pattern
takes place in this part and a range of different design patterns with suitable examples will be
included in the last part of the assignment.
A concept of object-oriented programming with using Java programs, that used to design,
implement and test a framework is known as advanced programming. The current scenario is
to write a payroll application for a recently started company that deals in the sales of
computer parts. The company has three types of employees, for which they required payroll
calculation application.
The first part of the assignment includes the concept of object-oriented programming like
abstraction, inheritance and others with analysing the design pattern types. Class diagram
with using a UML tool included in the second part of the assignment as well as code
implementation place in the third learning outcomes. Code development on a design pattern
takes place in this part and a range of different design patterns with suitable examples will be
included in the last part of the assignment.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

LO1 Examine the key components related to the object-oriented
programming paradigm, analysing, design, pattern types
P1 Examine the characteristic of the object-oriented paradigm as well as the
various class relationships
A real-world entity is called as an object and a paradigm or methodology to design a program
with using suitable class and objects is known as object-oriented programming. The object-
oriented has some concept like object, class, inheritance, polymorphism, abstraction,
encapsulation, composition and others.
Object: these are the basic run-time entities of the OOPs that used to represent a place, a
table of data, a person that is going to use in a program. it’s an example of a class and define
the behaviour and state of the program.
Class: a logical entity and the collection of different objects is called class. It is the blueprint
of an object that contains different functions and data as a unit. Class does not need any
memory at the creation time as it only occupies by the object. Class is also used to define data
types of a program.
Figure 1: Class
Abstraction: show the functionality of the program and hide the internal details of the
program is known as abstraction. For example, the process of phone call we user don’t know
the internal process of the calling. It is also known as abstraction data types (ADT) as it has
the ability to filter the unimportant data or information and focus on the usable data in the
program (java point, 2019).
Encapsulation: wrap or bind the data and code of a programming module in a single unit is
known as encapsulation. It is a feature of class and not accessible from outside of the class. It
provides security to the data and code of the program as it also known as the black box.
programming paradigm, analysing, design, pattern types
P1 Examine the characteristic of the object-oriented paradigm as well as the
various class relationships
A real-world entity is called as an object and a paradigm or methodology to design a program
with using suitable class and objects is known as object-oriented programming. The object-
oriented has some concept like object, class, inheritance, polymorphism, abstraction,
encapsulation, composition and others.
Object: these are the basic run-time entities of the OOPs that used to represent a place, a
table of data, a person that is going to use in a program. it’s an example of a class and define
the behaviour and state of the program.
Class: a logical entity and the collection of different objects is called class. It is the blueprint
of an object that contains different functions and data as a unit. Class does not need any
memory at the creation time as it only occupies by the object. Class is also used to define data
types of a program.
Figure 1: Class
Abstraction: show the functionality of the program and hide the internal details of the
program is known as abstraction. For example, the process of phone call we user don’t know
the internal process of the calling. It is also known as abstraction data types (ADT) as it has
the ability to filter the unimportant data or information and focus on the usable data in the
program (java point, 2019).
Encapsulation: wrap or bind the data and code of a programming module in a single unit is
known as encapsulation. It is a feature of class and not accessible from outside of the class. It
provides security to the data and code of the program as it also known as the black box.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Inheritance: a process of the programming in which objects of a class obtain the properties
of another class. In this process, the old class inherit the properties of an existing class to
define a new class. Code reusability is possible with using this concept with the runtime
polymorphism.
Aggregation: an association relationship between two classes that used to define as “has-a”
and the complete part. In other words, an entity reference hold by a class is known as
aggregation in Java.
Example:
Class employee {
Int id;
String name;
Address address;//Address is a class
…
}
Composition: a design technique that used to implement has-a relation in the class is known
as composition in java. User can follow java inheritance or the object composition to reuse
the java code (javatpoint, 2019).
Polymorphism: this concept of the object-oriented programming defines as the ability to
perform a task in more than one way. In other words, a task can be performed in a different
way. This process is known as polymorphism. In the java concept, follow method overriding
and method overloading to perform the polymorphism. Two different way used to represent
polymorphism as static polymorphism and dynamic polymorphism. Static is known as
method overloading and dynamic is known as method overriding (Exforsys, 2006).
Constructor: special class functions that used to perform the initialization of every object. A
constructor is called by the compiler at the time of object creation and it initializes the value
to the member of an object after the allocation of the storage. Different types of the
constructor are used in object-oriented programming concept as below:
Default constructor: it has no parameter as well as not take any kind of argument
of another class. In this process, the old class inherit the properties of an existing class to
define a new class. Code reusability is possible with using this concept with the runtime
polymorphism.
Aggregation: an association relationship between two classes that used to define as “has-a”
and the complete part. In other words, an entity reference hold by a class is known as
aggregation in Java.
Example:
Class employee {
Int id;
String name;
Address address;//Address is a class
…
}
Composition: a design technique that used to implement has-a relation in the class is known
as composition in java. User can follow java inheritance or the object composition to reuse
the java code (javatpoint, 2019).
Polymorphism: this concept of the object-oriented programming defines as the ability to
perform a task in more than one way. In other words, a task can be performed in a different
way. This process is known as polymorphism. In the java concept, follow method overriding
and method overloading to perform the polymorphism. Two different way used to represent
polymorphism as static polymorphism and dynamic polymorphism. Static is known as
method overloading and dynamic is known as method overriding (Exforsys, 2006).
Constructor: special class functions that used to perform the initialization of every object. A
constructor is called by the compiler at the time of object creation and it initializes the value
to the member of an object after the allocation of the storage. Different types of the
constructor are used in object-oriented programming concept as below:
Default constructor: it has no parameter as well as not take any kind of argument

Parametrized constructor: use some parameters and provide different values to a
different object and their data members by using the process of passing a value as an
argument.
Copy constructor: it used to copy the value of a data member of an object and into
another object.
Destructor: a special function that used to destroy the object of a class when the scope of the
class ends. The compiler automatically called the destructor when the scope of an object ends
(Studytonight, 2019).
different object and their data members by using the process of passing a value as an
argument.
Copy constructor: it used to copy the value of a data member of an object and into
another object.
Destructor: a special function that used to destroy the object of a class when the scope of the
class ends. The compiler automatically called the destructor when the scope of an object ends
(Studytonight, 2019).
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

M1 Determine a design pattern from each of the creational, structural and
behavioural pattern types
The concept of design pattern is used as a repeatable solution to a common problem in
software design that occur repeatedly. The design pattern provides the solution for different
situations in the form of template or description as it does not use a code for direct
implementation. GOF (gang of four) publish a book in 1994 with the title as, Design Patterns-
Elements of Reusable object-oriented software. The name of the authors was, Erich Gamma,
Ralph Johnson, Richard Helm and John Vlissides. These patterns are used as the best practice
in software development and a common platform to develop code and resolve the problems.
The types of a design pattern are as below:
Creational design pattern: use a new operator to create and install the objects with
hiding their creation logic. This pattern used in both, class creation and object creation
and provide the flexibility to decide of object creation of a particular use case.
Structural design pattern: this design pattern is used in the composition of class and
object. It uses the inheritance concept to compose the interfaces and define different
patterns for the composition of new objects with new functionalities.
Behavioural design Pattern: this design pattern uses for the communication of class
and object concept.
J2EE design pattern: this pattern identifies by Sun Java centre and is used in the
presentation tier (tutorialspoint, 2019).
behavioural pattern types
The concept of design pattern is used as a repeatable solution to a common problem in
software design that occur repeatedly. The design pattern provides the solution for different
situations in the form of template or description as it does not use a code for direct
implementation. GOF (gang of four) publish a book in 1994 with the title as, Design Patterns-
Elements of Reusable object-oriented software. The name of the authors was, Erich Gamma,
Ralph Johnson, Richard Helm and John Vlissides. These patterns are used as the best practice
in software development and a common platform to develop code and resolve the problems.
The types of a design pattern are as below:
Creational design pattern: use a new operator to create and install the objects with
hiding their creation logic. This pattern used in both, class creation and object creation
and provide the flexibility to decide of object creation of a particular use case.
Structural design pattern: this design pattern is used in the composition of class and
object. It uses the inheritance concept to compose the interfaces and define different
patterns for the composition of new objects with new functionalities.
Behavioural design Pattern: this design pattern uses for the communication of class
and object concept.
J2EE design pattern: this pattern identifies by Sun Java centre and is used in the
presentation tier (tutorialspoint, 2019).
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

LO2 Design a series of UML Class diagrams
P2 Design and build class diagram using a UML tool
The class diagram is a part of UML (unified modelling language) that used to design a
structure to define the system’s classes, different operations and their attributes with
relationships of their objects. In the current scenario, design a UML class diagram with a
different class of the program like all calculations, employee details, print receipts and
program class.
Figure 2: Class diagram
Represent the class diagram of the current system with using its created classes like all
calculation, program, employee details and print script. Each class include its private and
public data types with functions, that defines in the above class diagram like,
All calculation: it is the class name of the class script and it has some different
functions in the form of structure as monthlysalary, working hours, total sales,
PayRatePrHour, RateOfCommission.
Employee details: the next class of the program that includes functions like,
employeeDetails_Load, ComEmployeeTypeSelectedindexChanges
Print receipt: provide the list of string as a result.
Program: the program class does not contain any integer and function.
P2 Design and build class diagram using a UML tool
The class diagram is a part of UML (unified modelling language) that used to design a
structure to define the system’s classes, different operations and their attributes with
relationships of their objects. In the current scenario, design a UML class diagram with a
different class of the program like all calculations, employee details, print receipts and
program class.
Figure 2: Class diagram
Represent the class diagram of the current system with using its created classes like all
calculation, program, employee details and print script. Each class include its private and
public data types with functions, that defines in the above class diagram like,
All calculation: it is the class name of the class script and it has some different
functions in the form of structure as monthlysalary, working hours, total sales,
PayRatePrHour, RateOfCommission.
Employee details: the next class of the program that includes functions like,
employeeDetails_Load, ComEmployeeTypeSelectedindexChanges
Print receipt: provide the list of string as a result.
Program: the program class does not contain any integer and function.

M2 Define class diagrams for specific design patterns using a UML tool
Show the different class of the UML diagram of current payroll system of the organization as
below:
All calculation:
All Calculations
Class - AllCalculations
+ monthlySalary
+ workingHours
+ totalsale
+ payRatePrHour
+ rateofcommission
Employee details:
Employee Details
Class - EmployeeDetails
+ private EmployeeDetails_Load
+ private CmpEmployeeType
_SelectedIndexChanged
Print Receipt:
Print Receipt
class PrintRecipt
+ string result
Program:
Program
+ class Program
+
Show the different class of the UML diagram of current payroll system of the organization as
below:
All calculation:
All Calculations
Class - AllCalculations
+ monthlySalary
+ workingHours
+ totalsale
+ payRatePrHour
+ rateofcommission
Employee details:
Employee Details
Class - EmployeeDetails
+ private EmployeeDetails_Load
+ private CmpEmployeeType
_SelectedIndexChanged
Print Receipt:
Print Receipt
class PrintRecipt
+ string result
Program:
Program
+ class Program
+
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

LO3 Implement code applying design patterns
P3 Build an application derived from UML class diagrams
Develop the payroll application for the employee of an organization to define their salary
structure. Provide screenshots of the application with a proper explanation as below:
Figure 3: Get employee details
The first step of the application is to get the employee details with the type of employee that
categorised by the organization. after selecting the employee type, enter the name of the
employee with its NI number and a base salary of the employee.
P3 Build an application derived from UML class diagrams
Develop the payroll application for the employee of an organization to define their salary
structure. Provide screenshots of the application with a proper explanation as below:
Figure 3: Get employee details
The first step of the application is to get the employee details with the type of employee that
categorised by the organization. after selecting the employee type, enter the name of the
employee with its NI number and a base salary of the employee.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 4: Enter Employee details
Represent the above figure with the employee details including its salary type, name, base
salary and NI number.
Figure 5: Payroll of the employee
Represent the above figure with the employee details including its salary type, name, base
salary and NI number.
Figure 5: Payroll of the employee

The next step is to generate the payroll of the employee as the payroll slip that includes
employee name, NI number, type of employee, that is the salaried employee with a base
salary and applicable amount. The net pay also represents on the payroll display.
Figure 6: Hourly Employee
The above image is to generate payroll slip for the hourly employees that is also a category of
employee in the company. Select the type of employee from the drop-down list and enter the
total working hours of the employee. Enter the name of the employee with its NI number.
This payroll display also includes a section to enter the rate of hourly salary of the employee.
employee name, NI number, type of employee, that is the salaried employee with a base
salary and applicable amount. The net pay also represents on the payroll display.
Figure 6: Hourly Employee
The above image is to generate payroll slip for the hourly employees that is also a category of
employee in the company. Select the type of employee from the drop-down list and enter the
total working hours of the employee. Enter the name of the employee with its NI number.
This payroll display also includes a section to enter the rate of hourly salary of the employee.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 23
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.