Question: c) Write C++ codes for the following: i) Write the definition of a value-returning function findPrice (int, char) that determines and returns the condominium price.

c) Write C++ codes for the following: i) Write the definition of a value-returning function findPrice (int, char) that determines and returns the condominium price. The price of the condominium is based on the view selection as listed in Table 1. Table 1 Description Price(RM) View Selection 1 290,000 2 Park View Golf Course View Lake View 350,000 3 420,000 The price of the condominium also includes whether the user chooses garage or without garage as parking space. If the user includes garage, an additional RM10,000 will be added to the price. If not, there is no additional charge. Both the view selection and the choice of the parking space are passed to the function through parameters. (3 marks) ii) In the main() function, prompt the user to enter the selection of the condominium view and the type of parking space. Then, call the function in c) i) to display the price of the condominium. (4 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
