Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Payroll System A company wants their payroll system developed in OOP and they have approached you for the basic structure and functionality. They want an

image text in transcribed

Payroll System A company wants their payroll system developed in OOP and they have approached you for the basic structure and functionality. They want an object with name and salary properties. The object should have a default constructor that initialises the properties to null and a parameterised constructor. The object should also have two accessors (methods of accessing the contents of a property), one for each property. They also want a method that will compare two objects and tell which has a better salary than the other Question 4 Declare and implement an Employee class for the payroll system: 4.1 Declare a class that meets the scenario requirements. Ensure that the method that compares the two objects receives objects of the Employee class and returns an int. (5 Marks) 4.2 Implement the class methods on the same code as the class declaration. (8 Marks) 4.3 Write a main function in the same code and test the payroll system. Use the parameterised constructor to create the two objects and then test the method that compares the two and display a message that states which employee earns more than which employee. (7 Marks) [Sub Total 20 Marks] Payroll System A company wants their payroll system developed in OOP and they have approached you for the basic structure and functionality. They want an object with name and salary properties. The object should have a default constructor that initialises the properties to null and a parameterised constructor. The object should also have two accessors (methods of accessing the contents of a property), one for each property. They also want a method that will compare two objects and tell which has a better salary than the other Question 4 Declare and implement an Employee class for the payroll system: 4.1 Declare a class that meets the scenario requirements. Ensure that the method that compares the two objects receives objects of the Employee class and returns an int. (5 Marks) 4.2 Implement the class methods on the same code as the class declaration. (8 Marks) 4.3 Write a main function in the same code and test the payroll system. Use the parameterised constructor to create the two objects and then test the method that compares the two and display a message that states which employee earns more than which employee. (7 Marks) [Sub Total 20 Marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

What are Electrophoresis?

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago