Question: Write a class called AutoDealer. Each dealer will have a name, number of employees, annual gross income, annual total salary, and annual fixed expenses as

Write a class called AutoDealer. Each dealer will have a name, number of employees, annual gross income, annual total salary, and annual fixed expenses as instance variables. Except for the name, all the other variables are private. Include get() and set() methods. Also include a netIncome() method which will calculate and return the net income ( = gross salary – total salary – fixed expense). Also include a toString() method that returns the values of instance variables.

Step by Step Solution

3.40 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create the AutoDealer class based on the details you provided well integrate various components 1 Class Definition and Instance Variables Well init... View full answer

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 Programming Questions!