Below is the table provided by the XYZ house developer to determine house price based on its type. Price/Square-Feet RM 397.50 Туре A RM 298.85 RM 318.30 B Figures 1(a) and 1(b) are the flowcharts of...


 Write a C++ program to implement the house price calculation as specified by the above
flowcharts. Table 1 is the test cases that you can use to test the program and the details of the
input/output style of the program


Below is the table provided by the XYZ house developer to determine house price based<br>on its type.<br>Price/Square-Feet<br>RM 397.50<br>Туре<br>A<br>RM 298.85<br>RM 318.30<br>B<br>Figures 1(a) and 1(b) are the flowcharts of the program proposed to calculate house<br>price based on its type and square-feet area. It gets the inputs that are the type and the square-<br>feet area of the house from the user before calculating the price by following the rate given by<br>the developer.<br>Start<br>char houseType<br>int sqft = 0<br>double price = 0<br>price = calcPrice(houseType, sqft)<br>Display<br>Display

Extracted text: Below is the table provided by the XYZ house developer to determine house price based on its type. Price/Square-Feet RM 397.50 Туре A RM 298.85 RM 318.30 B Figures 1(a) and 1(b) are the flowcharts of the program proposed to calculate house price based on its type and square-feet area. It gets the inputs that are the type and the square- feet area of the house from the user before calculating the price by following the rate given by the developer. Start char houseType int sqft = 0 double price = 0 price = calcPrice(houseType, sqft) Display Display "Welcome to XYZ house price calculator" houseType, price End Get houseType HouseType is A or B or C? 840 <= sqft=""><= 1920="" f="" get="" sqft="" figure="" 1(a):="" flowchart="" to="" calculate="" house="" price="" 2="" calcprice(housetype,="" sqft)="" double="" p="0" housetype="" is="" a?="" p="sqft" x="" 397.50="" housetype="" is="" b?="" p="sqft" x="" 298.85="" housetype="" is="" c?="" p="sqft" x="" 318.30="" return="" p="" figure="" 1(b):="" flowchart="" to="" calculate="" house="">
Table 1: Test cases to run and test the program (user inputs are shown in red-bold text)<br>TEST CASE 1<br>Welcome to XYZ house price calculator<br>Please enter house type (A/B/C) : D<br>Please enter house type (A/B/C): a<br>Please enter house type (A/B/C) : A<br>Square-feet area of the house (840-1920): 900<br>Price of a type A house (900 square-feet) is RM 357750<br>TEST CASE 2<br>Welcome to XYZ house price calculator<br>Please enter house type (A/B/C) : B<br>Square-feet area of the house (840-1920) : 839<br>Square-feet area of the house (840-1920): 1921<br>Square-feet area of the house (840-1920): 900<br>Price of<br>ype B house (900 square-feet) is RM 268965<br>3<br>TEST CASE 3<br>Welcome to XYZ house price calculator<br>Please enter house type (A/B/C) : C<br>Square-feet area of the house (840-1920): 1920<br>Price of a type C house (1920 square-feet) is RM 611136<br>

Extracted text: Table 1: Test cases to run and test the program (user inputs are shown in red-bold text) TEST CASE 1 Welcome to XYZ house price calculator Please enter house type (A/B/C) : D Please enter house type (A/B/C): a Please enter house type (A/B/C) : A Square-feet area of the house (840-1920): 900 Price of a type A house (900 square-feet) is RM 357750 TEST CASE 2 Welcome to XYZ house price calculator Please enter house type (A/B/C) : B Square-feet area of the house (840-1920) : 839 Square-feet area of the house (840-1920): 1921 Square-feet area of the house (840-1920): 900 Price of ype B house (900 square-feet) is RM 268965 3 TEST CASE 3 Welcome to XYZ house price calculator Please enter house type (A/B/C) : C Square-feet area of the house (840-1920): 1920 Price of a type C house (1920 square-feet) is RM 611136
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here