Programming activity:

Start with this project.

You will need to create the following methods. Notice the constructor automatically initializes 50 cars.

Add the methods:

  • printAllSales ()
  • printWorkerSales (String workersName) that will print out all sales by that worker
  • findAvgProfit that will return the average profit of all sales
  • findSale (taking in argument of sale price) that will return the first Sale that has that price
  • deleteWorkerSales (String workersName) that will delete all sales done by this worker
  • decreaseAllSalePrice() that will decrease all sale prices by $50
  • public ArrayList<Sale> getTopSales (int profit) that will return as an arraylist with all sales that have a profit greater than or equal to profit

BELOW IS ADVANCED

  • sortByProfit
  • public Sale[] getTopTen() that will return as an array the top ten sales by profit. [use sortByProfit first] -extra credit

Rubric 10.5 point project (1.5 points each)