Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Java, use the program Pseudo Code Outline to construct a program: This is the output for a sample run of the program. Match the
Using Java, use the program Pseudo Code Outline to construct a program:
This is the output for a sample run of the program. Match the prompts and messages to what is shown below:
Pseudo Code Outline display purpose and author of the program; prompt to see if the user wishes to run the program; read user response; while (response is 'y' or 'Y') prompt and read three integer sides; if (sidel > side3) swap them; if (side2 > side3) swap them; if (the simplified triangle condition is met) if (the right-angled triangle condition 19 met) print "Valid right-angled triangle"; else if (equilateral triangle condition is met) print "Valid equilateral triangle"; else if (isosceles triangle condition is met) print "Valid isosceles triangle"; else print "Valid scalene triangle"; else print "Not a valid triangle"; prompt to see if the user wishes to run the program; read user response; print closing remarks Want to run? (enter y to run): Y Enter an int sidel: 1 Enter an int side2 : 2 Enter an int side3: 3 Not a valid triangle. Want to run? (enter y to run): Y Enter an int sidel: 2 Enter an int side2: 3 Enter an int side3: 4 Valid scalene triangle, not right-angled. Want to run? (enter y to run): Y Enter an int sidel: 3 Enter an int side2: 4 Enter an int side3: 5 Valid right-angled triangle. Want to run? (enter y to run): Y Enter an int sidel: 4 Enter an int side2: 4 Enter an int side3: 4 Valid equilateral triangle Want to run? (enter y to run): Y Enter an int sidel: 4 Enter an int side2 : 4 Enter an int side3: 5 Valid isosceles triangle. Want to run? (enter y to run): n Program has terminated
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