Assignment title: Java


Question Java Programming Q A Sample program is provided. Make sure you understand this code as it will help you with your own programming for this assignment. Using the uncommented sample code for classes provided, answer the following questions:

1. Draw a UML diagram of the Shoe class using the code that has been provided. Complete this using the examples that have been provide in the lecture slides. 2. Draw a UML diagram of the Store class using the code that has been provided. Complete this using the examples that have been provide in the lecture slides. 3. Copy the code from Store.java into your report and appropriately comment the code. At a minimum, explain the purpose of each method. For the more complex methods reading input from a file, sorting the data and exporting data to the file, insert comments to explain the code.

4. Briefly explain the code in sortInventory. What is the inventory being sorted by? What is the sort algorithm that is being used. Explain in words how it works. Why do you need to use two for loops? 5. Briefly explain what other sorting algorithms could have been used.

6. What method of searching for shoes has been used in the program? What other algorithm could have been used. 7. Examine the lines to open the output file and write the outputString in the ShoeStore class