You are on page 1of 2

CS313 INTERMEDIATE COMPUTER PROGRAMMING

Spring 2024 – MIDTERM EXAM (PROJECT ASSESMENT)

Faculty: Dr. Umut Tosun


Percentage of Course: 10% of course evaluation
Date set: 28th February 2024 15:00 PM
Due Date: 3rd March 2024 23:59 PM

Project Description:

You are tasked with implementing a simplified banking system that models the behavior of bank accounts. This
project will test your knowledge and skills in various C++ concepts, including copy constructors, multiple inheritance,
operator overloading, range-based loops, standard template library (STL), and virtual functions. You will also be
required to design and implement a class hierarchy for different types of bank accounts.

Project Requirements:

1- Class Hierarchy:
➢ Create a base class called BankAccount with the following attributes:
• std::string accountNumber
• std::string accountHolderName
• double balance
➢ Implement the following member functions for the BankAccount class:

• A default constructor.
• A parameterized constructor that takes accountNumber, accountHolderName, and balance as
parameters.
• A copy constructor.
• A virtual function void deposit(double amount) that adds amount to the balance.
• A virtual function void withdraw(double amount) that subtracts amount from the balance.
• A virtual function void display() const that displays the account information (account number,
account holder name, and balance).
2- Derived Classes:
• Create two derived classes, SavingsAccount and CheckingAccount, both inheriting from
BankAccount.
• SavingsAccount should have an additional attribute double interestRate and a member function
void addInterest() that increases the balance by the interest rate times the current balance.
• CheckingAccount should have an additional attribute double overdraftLimit and override the
withdraw function to allow for overdrafts up to the overdraft limit.
3- Operator Overloading:
Implement the + operator overloading for BankAccount objects to combine the balances of two accounts
and return a new BankAccount object.

4- STL Usage:
Use an STL container (e.g., std::vector) to store and manage a collection of BankAccount objects.

5- Range-Based Loops:
Use range-based loops to iterate through and display the information of all the accounts in your container.
CS313 INTERMEDIATE COMPUTER PROGRAMMING
Spring 2024 – MIDTERM EXAM (PROJECT ASSESMENT)

Faculty: Dr. Umut Tosun


Percentage of Course: 10% of course evaluation
Date set: 28th February 2024 15:00 PM
Due Date: 3rd March 2024 23:59 PM

Rubric:

Criterion Points
Class Hierarchy
BankAccount class with attributes 10
Constructors and copy constructor 10
Virtual functions and display method 10
Derived Classes
SavingsAccount class and attributes 10
CheckingAccount class and attributes 10
addInterest and withdraw overrides 10
Operator Overloading
+ operator overloading 10
STL Usage
Proper use of STL container 10
Range-Based Loops
Iteration and display of accounts 10
Code Quality and Documentation 10
Total Points 100

Submission:

1. Implement the project in C++.


2. Include comments and documentation as necessary to explain your code.
3. Create a clear README file that describes how to compile and run your program.
4. Zip your project folder and submit it by the specified deadline.

Important Notes:

• Plagiarism or unauthorized collaboration with others will result in a grade of zero for the project.
• Late submissions will be subject to a penalty unless prior arrangements are made.
• Make sure your code is well-organized, readable, and follows C++ best practices.

You might also like