Answered step by step
Verified Expert Solution
Question
1 Approved Answer
URGENT PLEASE HELP C++ You are required to write a program to calculate the college rental that should be paid by each student. There are
URGENT PLEASE HELP
C++
You are required to write a program to calculate the college rental that should be paid by each student. There are two categories of students: bachelor and married student. The following table shows the rental details available for a bachelor student. Rental type Single 2 persons 3 persons 4 persons Total Rental per Month (RM) 120.00 100.00 80.00 60.00 The following table shows the rental details available for a married student. Rental type 4 rooms 3 rooms 2 rooms 1 room Total Rental per Month (RM) 400.00 300.00 200.00 150.00 Write a complete program to do the following: Prompt user for the student's status and rental type. Create a function calcBach() to calculate the total rental that should be paid by the bachelor student in one semester (assumes one semester is 4 months studies). Create a function calcMarr() to calculate the total rental that should be paid by the married student in one semester (assumes one semester is 4 months studies) Upon stopping the rental process, the program will display: the total number and the total rental for bachelor students the total number and the total rental for married students Allow above processes to continue as many times as the user wishes and terminate process when user enter a request to stop. (Hint: use do-while or while sentinel). (30 Marks)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started