Write a program that will calculate area for plane shapes. User will be prompted with a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that will calculate area for plane shapes. User will be prompted with a menu to choose the shape they want to calculate. The program prompts user for input data required for the calculation such as base, height and width. The program then display area of the shapes and prompt the user whether they want to continue or exit. The program will only stop if the user chooses to exit by entering N. Sample output is shown below: Area Calculator for Plane Shapes Choose the shape below by entering the number: 1. Triangle 2. Rectangle 3. Square 4. Circle Enter your choice: 1 Please enter the following information: Base: 4 Height: 8 The area of triangle is 16 Do you want to continue (Y/N)? N Thank you for using the calculator. Formula for area calculation: Shapes Triangle Rectangle Square Circle Parameters b= base, h= height Area Formula xbxh wxh w = width, h = height a = length of side pie = 3.142, r = radius pie x radius Write a program that will calculate area for plane shapes. User will be prompted with a menu to choose the shape they want to calculate. The program prompts user for input data required for the calculation such as base, height and width. The program then display area of the shapes and prompt the user whether they want to continue or exit. The program will only stop if the user chooses to exit by entering N. Sample output is shown below: Area Calculator for Plane Shapes Choose the shape below by entering the number: 1. Triangle 2. Rectangle 3. Square 4. Circle Enter your choice: 1 Please enter the following information: Base: 4 Height: 8 The area of triangle is 16 Do you want to continue (Y/N)? N Thank you for using the calculator. Formula for area calculation: Shapes Triangle Rectangle Square Circle Parameters b= base, h= height Area Formula xbxh wxh w = width, h = height a = length of side pie = 3.142, r = radius pie x radius
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
In Figure a small block of mass m = 0.032 kg can slide along the frictionless loop-the loop, with loop radius R = 12 cm. The block is released from rest at point P, at height h = 5.0R above the...
-
You have been hired by a file hosting streaming service to write a program that will calculate the cost of a user to store and stream audio files. The streaming platform hosts two types of audio...
-
Financial accounting is found when draw up financial statements used as a end of term form of accounting like when a person gets their bank statement or balance sheets. Managerial accounting is more...
-
Longhorn Technologies has the following year-end balances in its three inventory accounts and cost of goods sold. Longhorn also informs you that actual overhead for the year was $692,415. Net income,...
-
The horizontal rigid beam ABCD is supported by vertical bars BE and CF and is loaded by vertical forces P1 = 400 kN and P2 = 360 kN acting at points A and D, respectively (see figure). Bars BE and CF...
-
Five projects form the mutually exclusive, collectively exhaustive set under consideration. The cash flow profiles for the five projects are given in the table below. Information on each project was...
-
Sandia Corporation manufactures metal toolboxes. It adds all materials at the beginning of the manufacturing process. The company has provided the following information: Required: 1. Using the...
-
23. If an item retails for $320 after being marked up by 85%, what was the dollar amount of the cost?
-
Course: Professional Selling / Business Please Don't Copy/Paste. Answer the following questions- Q1. Background: You've had success at Stanley Black & Decker in your initial role as an Inside Sales...
-
3 Question #2 (10 points) 1 5 The recent 2021 financnial statements for CommX Corp. are below. The company expects to experience sales 5 growth in 2022 of 12%. For 2022, assets and costs are expected...
-
What is iteration hardening and why is it important in DAD? 1. Refusing to accept changes to the sprint backlog so the team can focus on the highest priorities 2. Validating the build against the...
-
I bought my Peloton when it had a fair value of $ 2 , 4 7 5 . Peloton offered me the ability to pay $ 6 9 / mo for 3 6 months instead of paying upfront. I took it . What was my liability the day I...
-
6. What are some advantages and disadvantages of using a single I/O interrupt queue? 7. What are some advantages and disadvantages of using multiple I/O interrupt queues? Job A B C D E F| Arrival...
-
3. Three charges are placed in locations shown in the diagram below. (a) What is the electric field (magnitude and direction) at point P? Answer the direction in terms of the angle relative to the...
-
Click the 100 button. What do you about the atoms in the chamber
-
A liquid flows upward through a valve situated in a vertical pipe. Calculate the differential pressure (kPa) between points A and B. The mean velocity of the flow is 4.1 m/s. The specific gravity of...
-
Given a set of cities, the central city is the city that has the shortest total distance to all other cities. Write a program that prompts the user to enter the number of the cities and the locations...
-
Rewrite Listing 30.6, ThreadCooperation.java, using the object?s wait() and notifyAll() methods. Listing 1 import java.util.concurrent.*; 2 import java.util.concurrent.locks.*; 3 4 public class...
-
Write a program that demonstrates the properties of a text area. The program uses a check box to indicate whether the text is wrapped onto next line, as shown in Figure 16.41a. Four score and seven...
-
In January 2014, installation costs of 6,000 on new equipment were charged to Maintenance and Repairs Expense. Other costs of this equipment of 30,000 were correctly recorded and have been...
-
Whittier Construction Co. had followed the practice of expensing all materials assigned to a construction job without recognizing any residual inventory. On December 31, 2015, it was determined that...
-
Prior to 2015, Heberling Inc. excluded manufacturing overhead costs from work in process and finished goods inventory. These costs have been expensed as incurred. In 2015, the company decided to...
Study smarter with the SolutionInn App