Display and calculate the rectangle area

Assignment Help Basic Computer Science
Reference no: EM131241708

Rectangle Area-Complete the Program

The Student CD contains a partially written program named AreaRectangle.cpp. Your job is to complete the program. When it is complete, the program will ask the user to enter the width and length of a rectangle, and then display the rectangle's area. The program calls the following functions, which have not been written:

• getLength - This function should ask the user to enter the rectangle's length, and then return that value as a double.

• getWidth - This function should ask the user to enter the rectangle's width, and then return that value as a double.

• getArea - This function should accept the rectangle's length and width as arguments, and return the rectangle's area. The area is calculated by multiplying the length by the width.

• displayData - This function should accept the rectangle length, width, and area as arguments, and display them in an appropriate message on the screen.

Reference no: EM131241708

Questions Cloud

Variation of two and give your comments regarding variation : The mean of the number of sales of cars over a 3-month period is $87, and the standard deviation is 5. The mean of the commissions is %5225, and the standard deviation is $773. A. calculate the coefficient of variation. B. compare the variation of th..
Write a function named celsius that accepts a fahrenheit : Demonstrate the function by calling it in a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their Celsius equivalents.
Prepare the appropriate journal entries to recognize : Prepare the appropriate journal entries to recognize the first quarter transactions, currently reported in Other Assets - Holding in the balance sheet.
What could you have done differently to empathize with them : Share an example of a time when you found it difficult to empathize with someone. How did you handle the situation? What could you have done differently to empathize with them? Consider what you have learned in class this week.
Display and calculate the rectangle area : getArea - This function should accept the rectangle's length and width as arguments, and return the rectangle's area. The area is calculated by multiplying the length by the width.
What is the velocity v1of the blood in the artery : The wider part has an area A1= 0.08 cm2, which equals the cross-sectional area of the artery. The narrower part has an area A2= 0.04 cm2. The pressure drop in the flow meter is 25 Pa. What is the velocity v1of the blood in the artery? (Density of blo..
Not change the supply curve for chinese-made toys : In June 2007 a U.S. toy company was forced to recall 1.5 million “Thomas the Tank Engine” toys because they contained lead paint. The toys had been made in China. You would expect these recalls to "decrease" or "increase" the demand curve for Chinese..
What is the magnitude of the friction force : When a horizontal force of 169 N is applied to a 86 kg box on a leveled floor, the box slides with constant velocity. What is the magnitude of the friction force (in N) on the box?
What is the ending balance of work in process on january : Prepare simple job-order cost sheets for each of the five jobs in process during January. What is the ending balance of Work in Process on January 31? What is the Cost of Goods Sold in January?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain the difference between frequency division multiplex

Explain the difference between frequency division multiplexing

  Create a start schema model

Imagine that you are a senior data warehouse architect for LECAL Corporation.  Your company has been contracted by the U.S. Department of Education to develop a data warehouse which will track student performance on a series of planned nationwide ..

  Participation in the world trade organization

In your opinion, do you believe the United States' participation in the World Trade Organization (WTO) is positive or negative for American businesses? What are your thoughts on the benefit and challenges of the raft of legal obligations imposed o..

  Use a truth table to determine whether

Use a truth table to determine whether or not the following argument form is valid. You can  justify  your answer by doing the following: indicate which columns represent the premises and which represent the conclusion;

  Specific web or mobile application purpose

Describe a specific web or mobile application's purpose. How is it used? What changes has it brought about to its users? What are some likely future uses and enhancements?

  Give an example of an original engineering design problem

Give an example of an original engineering design problem and clearly outline the objectives, the constraints, and the design variables.

  Difference between mechanical and substantive editing

What's the main difference between mechanical and substantive editing? When an editor is obliged by his or her place of employment to apply certain preset conventions to the text and layout of a document, the editor is said to be working according ..

  Explain why a multiplicative inverse

Explain why a multiplicative inverse mod 7 of 13 does or does not exist. If one does exist, give a value for it and use appropriate calculations to show that it is a multiplicative inverse of 13 mod 7.

  Create documentation for project that summarizes the process

Create documentation for this project that summarizes the process for using the entities and attributes for fleet truck maintenance. The Entities and Attributes for Fleet Truck Maintenance can be found in the Huffman Trucking Virtual Organization.

  What does it mean to instantiate an object

Also, describe the difference between composition and aggregation and when it is better to use one over the other?

  Explain a machine shop has two automatic milling machines

A machine shop has two automatic milling machines. Machines' operation output data is in XML format. To improve the energy efficiency of the machines, operation data of power consumption and time stamps for each operation need to be extracted f..

  Difference in computer program and programming a computer

Explain the difference between using a computer program and programming a computer. How do you discover syntax errors. How do you discover logic errors. What is the difference between object and object reference

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd