Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 3 ) Square If the user input 1 , ask the user to input the width and length of the rectangle, and then print

(3) Square
If the user input 1, ask the user to input the width and length of the
rectangle, and then print the shape name (Rectangle) and the area.
If the user input 2, ask the user to input the radius of the circle. Then print
the shape name (Circle) and the area.
If the user input 3, ask the user to input the side length, and then print the
shape name (Square) and the area.
Page 15 of 60
AUT COMP603/ENSE600 PDC/SC Tutorials
If the user input other numbers, print out "Wrong input" and terminate the
program
If the user input other characters, print out "Invalid input. Not an integer"
and terminate the program.
Find codes from Google/Bing
You may be aware that the output of ShapeCalculator1 is as follows:
You want to format the decimal number, always keeping three decimal places.
Search Google or Bing to find out how to achieve this, making the output like the
follows:
Circle
19.635
Rectangle
198.000
Square
10.890
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions