You are writing a program that will take as input ahome type, alength, and awidth.Home types are: "trailer", "bungalow", "two-storey"Home type:bungalowLengths are from 20 feet to 72 feet (real...




You are writing a program that will take as input ahome type, alength, and awidth.




Home types are: "trailer", "bungalow", "two-storey"







Home type:


bungalow





Lengths are from 20 feet to 72 feet (real estate still tends to use imperial measures)







Length:


48





Widths are from 8 feet to 27 feet







Width:


27








From this, you are to generate an insurance report (example printed line):














You are insuring a bungalow of 1296 square feet.











If any of the data is invalid (less than the minimum or maximum, or not one of the defined types) then you should print:







***INVALID DATA***








Note, however, if you are dealing with a trailer, you have to also check the following:



















  • If the trailer is 40 feet in length or less, you are insuring it as atravel trailer, so your output might look like:


















You are insuring a travel trailer of 320 square feet.















  • If it is more than 40 feet in length, it will look like this:



















You are insuring a mobile home of 1152 square feet.

























Remember, a two-storey has double the square feet.











You should employ a nested if structure to solve this problem.


Feb 11, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here