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
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
Get step-by-step solutions from verified subject matter experts
