in java I need to fix the first program correctly
Write a program named HW4CreateInventory.java to store shoe data into an "inventory" data file. Ask the user to enter the name of the file to store the information into. If the file exists, ask the user if they want to append to the file, erase the existing data from the file, or use a different file. Handle the user's choice appropriately. Then, repeat until the user is done entering shoe data, capture the shoe number, purpose (casual, dress, or athletic) and the four factor values (price, comfort, look, and function) for each pair of shoes. (This program would be something that the shoe store clerk would run, as they enter new shoes into inventory or that would be captured by the store, based on online reviews from customers.) b. Write a second program named HW4ShoeAdvisor.java to ask the user for a purpose, and ask the user to set their weight preferences. (Verify that the weight preferences adds up to 10). Then read the inventory data file, and output the best pair of shoes for that purpose, using the user's weight preferences. Repeat until the user is ready to quit. Sample data is shown below. Assume we are only interested in the three purposes shown. Shoes 1-3 are the sample shoes described above. (This program would be ran by a customer looking for a pair of shoes.) Sample User's Weight Preferences: 3 2 2 Sample shoes in inventory: Shoe Using the sample weights, Number Purpose Price Comfort | Look Function calculated shoe rating 1 casual 3 5 5 34 2 casua 5 2 5 3 40 3 casual 5 4 3 31 4 dress 4 5 4 4 42 5 athletic 2 4 5 2 33 6 dress 3 5 4 5 41 7 athletic 5 4 3 5 42 8 dress 5 3 4 3 39 Use JFileChooser for choosing the filename. Output your name as part of the output. To make this a useable solution in real-life: What additional data would you need? What additional questions would you need answered? What are additional modifications would you need to make? Include your answers to these questions in your heading documentation of the second program. Bonus: Ask the user if he/she wants to use the default weights (the same as Emily's weights), or set their own weights. Then, continue with the shoe advisor appropriately. Validate the purpose of the shoe meets one of the three listed. More Bonus: Incorporate additional factors into your solution that would aid its value in a real-life situation. In the heading documentation explain what problem your bonus is focused on solving and how your implementation solves it. More Bonus: Using a different problem domain, answer the questions above and solve the problem. For example, how would you: rank football teams? Decide which car to purchase? Decide which school to attend