Question: Java Write a class and a Java program to use the class. Part 1. Create a class called Income that contains the following: 1. Two

Java
 Java Write a class and a Java program to use the

Write a class and a Java program to use the class. Part 1. Create a class called Income that contains the following: 1. Two (2) instance variables a double called "IncomeYTD" and double called "hourlyRate" The class should also include the following methods: 2. a constructor that receives 2 double parameters; the constructor will use these parameters to initialize the incomeYTD and the hourlyRato respectively. 3. setincomeYTD: it receives a double parameter and assigns it to the incomeYTD. 4. getincomeYTD: it returns the incomeYTD value 5. calculatelncome it receives a double parameter and calculates and returns the current income amount for the current hourly rate (income = hourlyRate times workingHours)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!