Question: MUST BE IN JAVA PROGRAM PLEASE! Write a Java program that displays a menu with 4 options. The program is to work as follows: 1.
MUST BE IN JAVA PROGRAM PLEASE!


Write a Java program that displays a menu with 4 options. The program is to work as follows: 1. Prompt a user for the option of 1 thru 5 from the menu. 2. Based on the option: a. If the user chooses 1 , your program will ask for an integer, then it will find the factors of that integer. b. If the user chooses 2, your program will ask for an integer, then it will display a pyramid starting with 1 and ends with that integer as follows: Assume the user enters 5 , the pyramid: c. If the user chooses 3 , your program will ask for an integer, then it will display all the prime numbers between 2 and that integer. d. If the user chooses 4 , your program will draw a calendar for one month. The program will ask for the month number, the number of days in that month, and the day that the first of the month falls on. So if the month was 1 (January), 31 (number of days), 5 (Thursday) where the first day starts, then it should draw: (assume 1 means Sunday) e. If the user chooses 5 , the program will stop the loop and quit the menu, and exit the program. Any other option 1 thru 5 , display an error to try again. USE PROPER DOCUMENTATION AND INDENTATION. YOUR OUTPUT MUST LOOK LIKE THE SAMPLE BELOW. MENU 1. Find Factors of a number 2. Draw a pyramid based on an integer 3. Find prime numbers 4. Draw a calendar Run your program, run a new option and show the output of each option. Please turn in the following documents: 1. The source code. 2. Screen shots of all the output General Rubric for programming assignments - Comments/proper identification/indentation - Add name(s) of all authors, class, assignment \#, and purpose to the program (2 points) - Use additional comments explaining your steps at least once every five lines. (2 points) - Use proper indentation (6 points) - Compilation/execution (40 pts) - Program must compile without syntax errors. You will get 0\% score if it does not compile. You should be able to fix at least all the syntax errors in your program. No output, no grade. - Program must execute and yield the correct output. You may get less than 50% of the total score if your program does not give the correct output. Make sure to test it with any given test data and that the output is as specified in the assignment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
