You have written a JAVA program that creates Shoe object with three instance variables. You will...

70.2K

Verified Solution

Question

Programming

You have written a JAVA program that creates Shoe object withthree instance variables. You will need to use the exception youcreated to go along with it. So far you have been using my driverclasses. Now it is time for you to create your own driverclass that will implement an ArrayList of Shoeobjects.

This assignment uses the Shoe.java and ShoeException.java tocreate the driver ShoeStore.Java

You will display a menu as follows:

  1. Add shoes
  2. Print all shoes of a given size
  3. Print all shoes of a given color
  4. Print all shoes
  5. End execution

The user will select an option. The program should loop andcontinue until the user selects 5 -End execution-.

You will be graded as follows

Resubmit your Shoe.java and your ShoeException.java (up to50 points if properly working)

ShoeStore.java (200 points) this is the driver class

  1. Add shoes (50 points)
  2. Print all shoes of a given size (50points)
  3. Print all shoes of a given color. Color is a number from 1 to5,  (50 points)
  4. Print all shoes   (50 points)
  5. End execution

Remember to use try/catch. Your code should not crash at anytime.   Code crashing -100points

The program name should be ShoeStore.java ifyou use any other name you will get points deducted.

Up to 50 points may be given for following thejava coding standards, indentation, comments, usability etc.

Students must always follow the JAVA Java coding standards forthe class.

Answer & Explanation Solved by verified expert
4.0 Ratings (457 Votes)
Note Could you plz go through this code and let me know if u need any changes in thisThank You Shoejava public class Shoe private String brand private int size private int color param brand param size param color public ShoeString brand int size int color thisbrand brand thissize size thiscolor color return the brand public String getBrand return brand param brand the brand to set public void setBrandString brand thisbrand brand return the size public int getSize return size param size the size to set public void setSizeint size thissize size return the color public String getColor String col if color 1 col red else if color 2 col green else if color 3 col blue else if color 4 col black else if color 5 col grey return col param color the color to set public void setColorint color thiscolor color public int getColorNum return color Override public String toString return Shoe Brand brand Size size Color getColor ShoeExceptionjava public class ShoeException extends Exception    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students