Write an “Inventory" class and a main driver program that will exercise each of the sort algorithms provided in the sortingupdates.java file provided below.The Inventory class must have attributes for...

1 answer below »
Write an “Inventory" class and a main driver program that will exercise each of the sort algorithms provided in the sortingupdates.java file provided below.The Inventory class must have attributes for item name, cost, and number of items in stock.The Inventory class must also implement the Comparable interface and provide a method to compare items such that they can be ordered.Items should be ordered alphabetically by the name.The driver program should be titled "SortItemList" and create an array of at least 5 item objects that will effectively test the sorting algorithms.The driver program must call each sorting method and display the unsorted array and each step of the sort algorithm leading to the sorted array (this requires inserting and calling a method for printing the array at different points in the provided sortingupdates.jave file).For the original and final item lists, you should use a nicely formatted output displaying each field. For the interim steps of each sort you can either use the same output format (in the order correlating to each step of the sort) or list the contents of the array at each step. Make sure to provide some comments for each line of code.

Answered 1 days AfterNov 26, 2021

Answer To: Write an “Inventory" class and a main driver program that will exercise each of the sort algorithms...

Kshitij answered on Nov 28 2021
126 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here