Answered You can hire a professional tutor to get the answer.

QUESTION

I need assistance with Homework Assignment 2-A, the coding portion and sample soft copy. Attach two files, the Analysis of the Problem (using Word or...

I need assistance with Homework Assignment 2-A, the coding portion and sample soft copy.

Attach two files, the Analysis of the Problem (using Word or a text editor) and your program (.cpp file). Do not cut and paste your code into the message section of the assignment area or your program will not be graded and you will receive a zero for the assignment.

You must attach both files in the same assignment area, do not submit separately or you will not receive full credit for the assignment.

PROBLEM: Haverly's Room Calculator (10 pts) Haverly's needs a program to calculate the area of a room depending on the shape of the room.  The program should output a menu asking the shape of the room as follows:

Haverly's Room Calculator: ************************

1. Square Room 2. Rectangular Room 3. Round Room 4. Quit

Please enter a menu item (1-4) > 

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

Use the following formulas:

Area of a rectangle or square: area = length * width;

Area of circle (r = radius):  area = jQuery200033834598363926194_1518533222834??????????

If the user enters a 4, the program should output a message saying, "Thank you for using Haverly's Room 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 values less than or equal to zero. If an invalid value is entered, display an error message and exit the program.

 COP2000 HOMEWORK ASSIGNMENT 2-A 2

SAMPLE OUTPUT:

 COP2000 HOMEWORK ASSIGNMENT 2-A 3

PSEUDO-CODE: A) Display the menu. B) Read in the input from the user. C) Validate user input (must input 1 through 4). D) Determine which menu item was used using an if statement or a switch statement.    D.1) Ask the user for the appropriate input.    D.2) Read the input.    D.3) Perform the appropriate calculation    D.4) Output the result      CONSTRAINTS:  The program must be written as one main program (NO Functions).  You can only use the following libraries <iostream> and <iomanip>  You must use: int main()  No Arrays or Vectors  The program must use real numbers.  The program must use local variables.  Output must be formatted properly.  Program must display the output in fixed point notation, rounded to two decimal places of precision.  Include a comment at the beginning of the program stating the purpose of the program, your name, the date, and your class.

 </p>

CREATE AN ANALYSIS OF THE PROBLEM: SAMPLE DOCUMENTATION (10pts) Using Word or a Text Editor, provide an Analysis of the Problem. file in the order presented below:  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.

WRITE THE PROGRAM:  Write the program according to your Analysis of the Program for the Problem above.

CHECK THE PROGRAM:  Does the program use real numbers?  Is the program displaying the output in fixed point notation, rounded to two decimal places of precision?  Have you checked your output against your Test Softcopy?

 COP2000 HOMEWORK ASSIGNMENT 2-A 4

Due Feb.14th by 11;59 p.m.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question