Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2: You are required to write program for a local business the calculates the salaries of the employees. There are three types of employees

Question 2:

You are required to write program for a local business the calculates the salaries of the employees. There are three types of employees hourly, daily wagers and permanent ones. Hourly wagers are paid $32 per hour, daily wagers are paid $180 per day while permanent employees are paid a fixed salary of $4200 per month with a deduction of $120 for each day off.

  • Write a class Salary with overload constructors i.e., one for each employee type. [10 Marks]

Data Members:

Int hour, Int day, Int Offdays

Member functions:

Int Calculatehourly()

Int CalculateDaily()

Int CalculatePermanent()

Getters/Setters for all data members of the class Salary

  • Write a class employee with the following data members and member functions: [5 Marks]

Data Members:

Int emoId

String empName

String empType

Salary empSalary

Member functions:

Employee(int, String, String)

displayempInfo()

Write a main method to test employee class and call displayempInfo method to print all details of employees i.e. empName, empType and Salary etc.

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 And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Determine the optimal feed stage location for Exercise 10.20.

Answered: 1 week ago