Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete program that asks the user to input two integers. The user is then prompted for an integer between 1 and 4 .
Write a complete program that asks the user to input two integers. The user is then prompted for an integer between 1 and 4 . If the user enters 1 , the integers are added, if 2 they are multiplied, if 3 the largest is output, if 4 the smalest is output. You MUST create the following methods and they MUST ALL return integers because they will be unit tested: public statie int add int a, int b) public static int Multiply \{int a, int b) public static int Largest (int a, int b) public statie int Snallest (int a, int b) MAIN outputs the result. Your methods do not output, they just return an int
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started