Start with the Sale.
Add the starter code of
the UsedCarLot class. You will need to create the following methods.
Notice the constructor automatically initializes 50 cars, although
the array holds 60 cars.
Add the methods:
- printAllSales ()
- printWorkerSales (String workersName)
- addSale (that will take in as parameters date, name, sale price,
- findSale (taking in argument of sale price) that will return
the first Sale that has that price
- public ArrayList<Sale> getTopSales (int profit) that will return as an arraylist all sales that have a profit greater than or equal to profit
- sortByProfit (use selection sort)
- sortByDate(use insertion sort) - extra credit
- sortByName () - extra credit
- public Sale getTopTen() that will return as an array the top ten sales by profit. [use sortByProfit first]
Rubric 8 point project.