CS 200 - Lab - 3
CS 200 - Lab - 3
Lab # 3
Lab Guidelines
1. You are allowed to perform/submit the lab only during lab timings
2. Copying/sharing code is strictly prohibited. Using unfair means will lead to immediate
disqualification
TA Signature: _____________________________
Task 1 - Money Heist [50 Marks]
In this question, you will simulate a bank’s customer data. Let’s create a struct called
“Customer”. Customer has three member variables: name (datatype : string), balance (datatype :
integer), account_type (datatype : char). There are two account types: Saving (represented as “S”
in account_type) and Current (represented as “C”).
Ex:
This current account belongs to Abdullah. The account currently has $0.
In this task, you will be working with classes. Let’s create a class called Date. Date has three
private member variables: day, month and year.
Create a default and parameterised constructor. [5+5 Marks]
struct LUMS
{
private:
string school;
string name;
string rollNumber;
public:
LUMS()
{
cout << "LUMS - Not for Profit - University" << endl;
}
void sadFunction()
{
LUMS happyStudent("School of Simple and Efficient Learning" ,
"HomoSapien" , "You know who I am");
cout << "If you look for the light you will often find it but if you
look for the dark that is all you will find.\n";
}
int main()
{
LUMS student("School of Stress and Existential Crisis" , "Human" , "Not
Known");
{
LUMS sadStudent;
anotherFunction(sadStudent);
}
sadFunction();
}
(You get a treat from Hassnain, if you answer this question correctly. Good Luck ^_^)
What is the output if the above program is executed?