Create a program using java data structures That has the user enter their pay rate; the program will require the employee to enter hours for two days ( they work two days a week); and the conversion must be done. via a recursive function (all calculation and display happen in a single function). Include an additional function to prompt the user for their numbers. Do NOT USE Stack ADT, ANY ADTs, or structures that we created in class. Employee - hoursWorked : int - payRate : double   -Employee(void) Default constructor - has NO parameters and must NOT return anything. Sets both attributes to 0. -AddHours(hoursToAdd : int) : void Adds the given hours to add to the hoursWorked attribute. -SetPayRate(newPayRate : double) : void Changes the payrate attribute to the given new pay rate. -GetHoursWorked(void) : int {hoursWorked} Gives back the hoursWorked attribute -+ GetPayRate(void) : double {payRate} Gives back the payRate attribute. -GetGrossPay(void) : double {grossPay} Computes and returns the gross pay   DeterminePay   -main(args : String[ ]) : void Gets the pay rate, gets the hours worked for two different days, and displays a pay summary. Placing the information into the object at the correct moments also occurs in here. - GetPayRate(void) : double {newPayRate} Prompts the user for the new pay rate and returns it. -GetHoursWorked(void) : int {hoursToAdd} Prompts the user for the number of hours worked on a single day and returns it. -DisplayPaySummary(anEmployee : Employee) : void Displays the hours worked, payrate, and gross pay to the user

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a program using java data structures

That has the user enter their pay rate; the program will require the employee to enter hours for two days ( they work two days a week); and the conversion must be done. via a recursive function (all calculation and display happen in a single function). Include an additional function to prompt the user for their numbers. Do NOT USE Stack ADT, ANY ADTs, or structures that we created in class.

Employee

- hoursWorked : int

- payRate : double

 

-Employee(void)

Default constructor - has NO parameters and must NOT return anything. Sets both attributes to 0.

-AddHours(hoursToAdd : int) : void

Adds the given hours to add to the hoursWorked attribute.

-SetPayRate(newPayRate : double) : void

Changes the payrate attribute to the given new pay rate.

-GetHoursWorked(void) : int {hoursWorked}

Gives back the hoursWorked attribute

-+ GetPayRate(void) : double {payRate}

Gives back the payRate attribute.

-GetGrossPay(void) : double {grossPay}

Computes and returns the gross pay

 

DeterminePay

 

-main(args : String[ ]) : void

Gets the pay rate, gets the hours worked for two different days, and displays a pay summary. Placing the information into the object at the correct moments also occurs in here.

- GetPayRate(void) : double {newPayRate}

Prompts the user for the new pay rate and returns it.

-GetHoursWorked(void) : int {hoursToAdd}

Prompts the user for the number of hours worked on a single day and returns it.

-DisplayPaySummary(anEmployee : Employee) : void

Displays the hours worked, payrate, and gross pay to the user

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Declaring and Defining the Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education