Question: Learning Outcomes Develop a menu-based interface using control structures. Use switch statements with integers, characters, and strings. Write code that repeatedly performs actions using while

Learning Outcomes Develop a menu-based interface using control structures. Use switch statements with integers, characters, and strings. Write code that repeatedly performs actions using while and do-while loops. o File is named wrongly (You did not use your name). (-100 pts, you get 0 for this assignment, resubmit allowed, late penalty applies) o Student handed in wrong file. (-100 pts, you get 0, resubmission allowed, late penalty applies.) o Program code does not compile / run. (-50 pts, resubmission allowed, late penalty applies.) o Comments include student name, class, and description of assignment. (5 pts) o Declares a class with the correct class name. (5 pts) o Code is properly indented. (5 pts) Main loop (25 pts) o Uses do-while loop. (5 pts) o Displays menu. (5 pts)

o Reads input from user. (5 pts) o Uses a switch statement to determine the cases. (5 pts) o Exits loop if user chooses option 4. (5 pts) Menu item 1: Perform an arithmetic operation (15 pts) o Reads expression from user. (5 pts) o Uses a switch statement to determine which operation to perform. (5 pts) o Performs the correct operation and displays the result. (5 pts) Menu item 2: Apply a function (15 pts) o Reads function and argument from user. (5 pts) o Uses a switch statement to select the correct function. (5 pts) o Applies the correct function to the argument and displays the result. (5 pts) Menu item 3: Calculate a factorial (10 pts) o Reads a number from the user. (5 pts) o Uses a while statement to calculate the factorial and displays the result. (5 pts) Menu item 4: exit the program (5 pts) o Displays a thank-you message and exits the program using System.exit. (5 pts) Displays an error message if user enters invalid menu option. (5 pts) Instructions 1. Start NetBeans. 2. Create a new project called Lab5 with a main class called YournameLab5 with your name. 3. Write output statements that display the following menu of options: Choose one of the following options: 1. Perform an arithmetic operation 2. Apply a function 3. Calculate a factorial 4. Exit the program

PLEASE ALSO EXPLAIN IT

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!