Question: Write a Java program titled FlexibleGeometryCalculator that enhances the GeometryCalculator. java in Lab 1 to make it work for any width & height input since
Write a Java program titled FlexibleGeometryCalculator that enhances the GeometryCalculator. java in Lab to make it work for any width & height input since we learned about variables & capturing user input.
Formulas:
area width height
perimeter width height
Your program should do the following :
start
declare and initialize integer variables height, width, area, & perimeter
create scanner object to read input from console
prompt user to Enter width
get width input in inches from the user
prompt user to Enter width
get height input in inches from the user
calculate area
output area
calculate perimeter
output perimeter
end
Example runs are shown below: Note: User input is in bold after each prompt
Enter width:
Enter height:
Area is square inches.
Perimeter is inches.
Enter width:
Enter height:
Area is square inches.
Perimeter is inches.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
