Question: Problem Statement Architect Area Calculator. Need help filing out tables below. with the following problem. An Architect company needs a program to calculate the area

Problem Statement Architect Area Calculator.

Need help filing out tables below. with the following problem.

An Architect company needs a program to calculate the area of different shapes. The C++ program should

calculate the area for the following shapes, a rectangle, a triangle and a circle.

Architect Area Calculator:

************************

1. Rectangle 2. Triangle 3. Circle 4. Quit

Please enter a menu item (1-4) >

If the user enters a 1, then the program should ask the user for the length and the width of the rectangle. If the user enters a 2, then the program should ask for the height and the base. If the user enters a 3, the program should ask for the radius.

Use the following formulas:

Area of a rectangle: area = length * width;

Area of triangle: area = (h*b)/2

Area of circle (r = radius): area =#

If the user enters a 4, the program should output a message saying, "Thank you for using Architect Area Calculator..." and exit the program.

Input Validation:The program must check to see if the user enters a valid number, i.e. 1 through 4, when selecting an item from the menu. If the user does not enter a valid menu item, display an error message and exit the program. For length, width or radius the program should not accept any non-zero or negative values. If an invalid value is entered, display an error message and exit the program.

Constant List: (Note constants are denoted byconstkeywordor#define;leave blank if no constants are defined):

Identifier

Description

Data Type

Value

Usage

Destination

Variable List:(Note: variable names and datatypes must match EXACTLY with what you have in your program)

Identifier

Description

Data Type

Source

Usage

Destination

Algorithm/Pseudo Code (must be in outline form):(Note: All variables from your code and your calculations must be included in your Algorithm/Pseudo Code)

  1. Define Variables

Data Tracing Chart:

Ref. to Algorithm

Input

Calculated

Here's the pseudo code for the program:

  1. Display the menu: "Architect Area Calculator: ********" "1. Rectangle" "2. Triangle" "3. Circle" "4. Quit" "Please enter a menu item (1-4) >"
  2. Read the input from the user using cin.
  3. Validate the user input to ensure that the input is a valid integer between 1 and 4. If the input is invalid, display an error message and exit the program.
  4. If the input is 1, ask the user for the length and the width of the rectangle. Read the length and the width.
  5. If the input is 2, ask the user for the height and the base of the triangle. Read the height and the base.
  6. If the input is 3, ask the user for the radius of the circle. Read the radius.
  7. If the input is 4, output the message "Thank you for using Architect Area Calculator..." and exit the program.
  8. Calculate the area of the shape based on the input using the appropriate formula:
  9. If input is 1 (rectangle), calculate the area using the formula: area = length * width. If input is 2 (triangle), calculate the area using the formula: area = (height * base) / 2. If input is 3 (circle), calculate the area using the formula: area = pi * radius * radius. Output the area of the shape in fixed point notation, rounded to two decimal places of precision.
  10. End the program.

Problem Statement: , completely defining the task to be performed by the computer (not by you) so that the entire program could be developed from only the facts provided in your statement.

Sample Softcopy: an example of the screen output that your program should produce.

Symbolic Constant List: a formal list documenting values that are constant each time the

program runs.

Variable List: a formal list documenting values that will change each time the program runs.

Algorithm or Pseudo Code (as an outline): the final corrected outline of steps for your

program to perform.

Data Tracing Chart: a table used to track the values of variables during a desk check.

Test Softcopy: a simulation of the screen's appearance during a desk check.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!