Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago