1. Use Do while loop to help the users to calculate shape Area 2. In each iteration: a. Ask the user to enter his choice to calculate. 1. "S" to calculate Square Area (length =X, area=X?) 2. "C" to calculate the circle area (n r²) (: n=3.14) 3. "R" to calculate the rectangle area (length * width) 4. "T" to calculate the triangle area (1/2 * base * height) b. Display the result c. Count the iteration number d. Ask the user to continue or quit by entering ^Z e. Display number of iterations

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question

Java code

please awnser it now????

1. Use Do while loop to help the users to calculate shape Area
2. In each iteration:
a. Ask the user to enter his choice to calculate.
1. "S" to calculate Square Area (length =X, area=X?)
2. "C" to calculate the circle area (n r²) (: n=3.14)
3. "R" to calculate the rectangle area (length * width)
4. "T" to calculate the triangle area (1/2 * base * height)
b. Display the result
c. Count the iteration number
d. Ask the user to continue or quit by entering ^Z
e. Display number of iterations
Transcribed Image Text:1. Use Do while loop to help the users to calculate shape Area 2. In each iteration: a. Ask the user to enter his choice to calculate. 1. "S" to calculate Square Area (length =X, area=X?) 2. "C" to calculate the circle area (n r²) (: n=3.14) 3. "R" to calculate the rectangle area (length * width) 4. "T" to calculate the triangle area (1/2 * base * height) b. Display the result c. Count the iteration number d. Ask the user to continue or quit by entering ^Z e. Display number of iterations
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Basics of loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning