Question: Make a class called SalesTracker In the class, begin by deleting the example instance variable, the line of code in the constructor that references the

Make a class calledSalesTracker

In the class, begin by deleting the example instance variable, the line of code in the constructor that references the variable, and the example method, adding suitable class comments and the following import statements:

import java.util.*;

import java.io.*;

  • i.Add a line of code to theSalesTrackerclass to declare an instance variabledesigners, which will reference a list ofDesignerobjects.
  • Next add a line of code to theSalesTrackerconstructor to initialisedesignersto a suitable collection compatible with your declaration.

  • ii.In theSalesTrackerclass, add a method with the header
  • private int computeBonus(Designer aDesigner)
  • The method should return the designer's bonus, computed by multiplying the number of years employed by the number of sales their product generated and dividing by 10, and then rounding down to a whole number.
  • For example, if the designer's years employed is 2, and the sales figure is 122, the method should return 24.

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