Lab 6-Task-2-3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CS 200 Lab 6 (CLO3/4) Spring 2023 Fri 24/02/2023

Task 2: (25 Marks)


Following the classes defined in the previous task:
• Overload ostream operator << for BankManagement class that prints information of all the
records of every bank account in the following format. (Hint: This function replaces displayLog()
function in Task 1.) [5 Marks]
First Name Last Name Account Number Account Type Balance
• Overload istream operator >> for BankManagement class. (Hint: This function replaces
addBankAccount() function in Task 1.) [5 Marks]
• Overload index operator [] for BankManagement class so that it returns the BankAccount object
at the specified index. [5 Marks]
• Overload index operator [] for BankManagement class so that it stores the given BankAccount
object at the specified index. [5 Marks]
• Write a displayUpToThisLimit() member function for BankManagement class which takes an
amount as an input and prints details of those BankAccounts that have balance amount less
than or equal to the amount passed to this function (apply the relevant checks **). The printed
information shall be in the following format. [5 Marks]
First Name Last Name Account Number Account Type Balance

STOP AND SHOW YOUR WORK TO THE TA


UPLOAD TASK 2 SOLUTION (CPP FILE ONLY) TO LMS
CPP FILE ONLY: YourRollNo-Lab##-Task2
Remember to include all the code of Task 1 as part of Task 2.

Please make sure that you upload on LMS within the allocated time slot. You will not be given extra time.

Task 3: (25 Marks)

Write down a main() function that

• Creates a Bank using the class BankManagement created in Tasks 1 and 2. Initialize this bank so
that it can store bank accounts of at least 100 clients. [2 Marks]
• Write a menu driven interface that interacts with a user and manages bank accounts of different
clients of the bank. Make sure that this menu tests all the functionality designed to manage a
bank account. [~2*10=20 Marks]
• The program continues to interact with the user until the user explicitly quits the program.
[3 Marks]
STOP AND SHOW YOUR WORK TO THE TA
UPLOAD TASK 2 SOLUTION (CPP FILE ONLY) TO LMS
CPP FILE ONLY: YourRollNo-Lab##-Task3
Remember to include all the code of Tasks 1 and 2 as part of Task 3.

Please make sure that you upload on LMS within the allocated time slot. You will not be given extra time.

You might also like