CSCI 160 Fall 2020 - Assignment (Practical Exercise) 2
Submit Deadline: 16:00, 2 October 2020, Friday


Objectives:

References:

Your Tasks:

Design and implement a C++ program with functions that helps (domestic) VIU students to calculate their course related tuition fees.

To simplify the program's business logic, we assume that our program only calculate tuitions for students in credit based undergraduate programs and every course the students enrolled in charges lab fees. In that case, VIU charges $153.73 per semester credit, and $22.08 lab fees per course.

Behavior-wise, your program should perform the following tasks:

Your program must implement and use the following functions:

// read from the user and return an integer number;
// use the parameter prompt message to tell the user
// the meaning of the data expected from the user
int readFromUser(string prompt);

// calculate and return the credit related tuition charge
// based on the credits and the rate of $153.73 per credit
double calculateCreditCharge(int credits);

// calculate and return the lab fee charge
// based on the number of courses
// and the rate of $22.08 per course
double calculateLabFee(int courses);

Your solution (the source code file) should have header comments for the whole program and each function, and proper in-line comments. Each time your program needs to read an input from the user, it should display an appropriate message to prompt the user.

What to submit:

Source code file of your program.

How to submit:

On csci server, go to the directory that holds the source code file you want to submit. To guarantee success, use "ls" to make sure that you can see the file and it is the only .cpp file in this directory.

Enter the following command:
~liuh/bin/submit 160 Pex2 .

Note that the command is case sensitive.

If this command is successfully executed, it should show you a list of the files just got submitted to the instructor's directory. If you submit your assignment more than once, all but the last one will be discarded. Take advantage of this feature, submit early and submit often. Your assignment must be submitted before the due date and time. Late submission will not be accepted.

To check which file you just submitted, enter the following command:
~liuh/bin/checksubmit 160 Pex2