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:
![](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/03/65e81531ea92f_1709712116209.jpg)
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:
Answer rating: 100% (QA)
Sure Heres a Python program that implements the area calculator for various plane shapes based on th... View the full 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...
-
2. Convert to standard form, then find the vertices, foci, length of the major axis, and graph 9x+16y-18x+64y-71=0 Center: Vertices: Co-Vertices: Foci: Major Axis: B 5 4 3 2 1 -7 -B -5 4 -3 -2 -1 0 1...
-
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...
-
Magenta Manufacturing has two pools for applying overhead to products. The first pool contains labor-related overhead costs and is applied at a pre-determined rate of $0.80 per labor dollar. The...
-
The Center for Disease Control (CDC) is interested in knowing if there are state-level population characteristics that predict the occurrence of breast cancer death rates and the occurrence of lung...
-
Industrial Marketing Management (Vol. 25,1996) puhlished a study that examined the demographics, decision-making roles, and time demands of product managers. Independent samples of n, = 93...
-
On February 4, Campbell Company sells inventory to a customer for $6,000. Terms of the sale are 1/15, net 30. On February 10, the customer returns $500 of merchandise. The customer pays on February...
-
The following is a December 31,2022 , post-closing trial balance for Carlberg Plumbing, Incorporated
-
a. What are the required elements of arson? b. Tom breaks into a neighbors barn, sets off 20 sticks of dynamite, and blows up the barn. The barn does not catch fire, but it is blown to small bits and...
-
Assume that research and development is a production activity that is intensive in skilled labor and that assembly is a production activity that is intensive in unskilled labor.If a country is...
-
Share your thoughts on the descriptions of coaching versus mentoring. Discuss which technique you personally find more helpful, incorporating your peers' example scenarios if possible. Provide...
-
Hanung Corp has two service departments, Maintenance and Personnel. Maintenance Department costs of $380,000 are allocated on the basis of budgeted maintenance-hours. Personnel Department costs of...
-
Discuss difference between nominal interest rate and real interest rate. Explain why real interest rate is more important than the nominal interest rate using your answer to Question 1 of the...
-
Refer to Figure 14-1. How would an increase in the money supply move the economy in the short and long run?
-
1) Special Relativity. Statement: Imagine this situation: Alice stands in New York City while Bob, aboard a plane departing from Boston, directly crosses over Alice at t=0. Disregard the vertical...
-
Determine whether each statement about the UNITED KINGDOM'S government is true or false. You may use the graphic on page 736 of your textbook. WORDBANK A. true B. false Question23. The queen or king...
-
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...
-
Commercial eggs produced from different housing systems. In the production of commercial eggs, four different types of housing systems for the chickens are used: cage, barn, free range, and organic....
-
What is the difference between a design study and an observational study?
-
Accounting and Machiavellianism. A study of Machiavellian traits in accountants was published in Behavioral Research in Accounting (Jan. 2008). Machiavellian describes negative character traits such...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App