Question: I really need help with this assignment! For this assignment, you are to create a program in Java that asks the user to enter the

I really need help with this assignment!

I really need help with this assignment! For this assignment, you are

to create a program in Java that asks the user to enter

For this assignment, you are to create a program in Java that asks the user to enter the size of a figure (must be odd), then displays a menu of 4 options. Options 1-3 will print various figures: box, diamond, X. Option 4 will allow the user to quit the program. You are to work on this assignment independently Program Design . You should have a single class called Figures . You will have 4 static methods: main, printBox, printDiamond, and printX. . The printBox,printDiamond, and printX methods should take as input an int parameter called size and print a box, diamond, or X shape respectively, of that given size. (see sample output at the end) 1. Ask the user to enter a number for the size of the figure. This number needs to be an ODD integer. If 2. Enter a loop in which you will display a menu of choices (1-4) and wait for user input (see example at . The main method should do the following the user enters a number that is not odd, ask him/her to reenter the number until it is odd. the end). The choices are: "1. Print box", "2. Print diamond", "3. Print X", and "4. Quit program" If options 1-3 are selected, print the corresponding figure shape with dimensions-size size, by calling the appropriate method. The exception is the diamond figure, which will have size rows and size+1 columns. See example for sample output. If option 4 is selected, quit the program and print "Good bye!" 3. 4. Additional Requirements The name of your Java Class that contains the main method should be Figures. All your code should be within a single file Your code should follow good coding practices, including good use of whitespace (indents and line breaks) and use of both inline and block comments You need to use meaningful identifier names that conform to standard Java naming conventions At the top of the file, you need to put in a block comment with the following information: your name, date, course name, semester, and assignment name. Your program needs to handle invalid inputs gracefully. For example, entering a number outside of a valid range should not crash the program. Instead, the user should be prompted to enter the number again. The output of your program should exactly match the sample program output given at the end 1. 2. 3. 4. 5. 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!