I need to create this coding: (JAVA PROGRAMMING) Write a program by creating an Employee class. This class has three instance variables: name , which is a String representing the name of the Employee...


 I need to create this coding:
(JAVA PROGRAMMING)


Write a program by creating anEmployee class. This class has three instance variables:




  • name, which is a String representing the name of the Employee


  • numberOfHoursPerDay, which is an int representing the number of hours the employee has worked per day


  • salary, which is an int representing the salary of the employee per-hourly basis


1. Creategetterandsettermethods of all the instance variables


2. Write a constructor for the classEmployee,which takes a String representing the name


3. Write a methodgetInfo() which takes the salary, number of hours of work per day of an employee as a parameter


4. Write a methodaddSal() which adds $10 to the salary of the employee if it is less than $500.


5. Write a methodaddWork() which adds $5 to the salary of the employee if the number of hours of work per day is more than 6 hours.


6. Write a caller class and create an object of classEmployee then call the methodsgetInfo, addSal, addWorkand print the salary of the employee



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here