0% found this document useful (0 votes)
28 views2 pages

Assignment No.3 Object Oriented Programming in C++ (EC 204) : 6. Do Debugging Exercises (EB 6 Edition)

The document outlines an assignment for an Object Oriented Programming class in C++. It includes 11 tasks: 1) Define classes for Student and Bank Account with data members and member functions. 2) Write a program to store data for 10 students using class objects in an array. 3) Explain the "friend" function declaration with examples. 4) Explain dereferencing operators with examples. 5) Define a class for objects like Time, Money, Distance with member functions. 6) Complete debugging exercises from a textbook. 7) Add appropriate constructors to previous programs. 8) Write a program for a long term fixed deposit system using dynamic constructors. 9)

Uploaded by

Meha Dave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

Assignment No.3 Object Oriented Programming in C++ (EC 204) : 6. Do Debugging Exercises (EB 6 Edition)

The document outlines an assignment for an Object Oriented Programming class in C++. It includes 11 tasks: 1) Define classes for Student and Bank Account with data members and member functions. 2) Write a program to store data for 10 students using class objects in an array. 3) Explain the "friend" function declaration with examples. 4) Explain dereferencing operators with examples. 5) Define a class for objects like Time, Money, Distance with member functions. 6) Complete debugging exercises from a textbook. 7) Add appropriate constructors to previous programs. 8) Write a program for a long term fixed deposit system using dynamic constructors. 9)

Uploaded by

Meha Dave
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment No.

3
Object Oriented Programming in C++ (EC 204)

1. Define classes for following data members and member functions. a.


Student
i.Data members
Roll Number
Name
Branch
Total_marks
ii. Member functions
To get the data
To display the data
b. Bank account
i.Data members
Name of the depositor
Account number
Type of account
Balance amount in the account
ii. Member functions
To assign initial values
To deposit an amount
To withdraw an amount after checking the balance
To display name and balance
To calculate interest on the principle ammount
2. Perform the 1.a program for 10 students. (Using array of objects).
3. Explain and type of declaration of “friend” function with suitable
examples.
4. Explain the concept of “dereferencing operators” with suitable
examples.
5. Define a class for following. Add another member function to add two
objects (without and with returning objects.)

Class name Time Money Distance1 Distance2


Private Hours Rupees Meters Feet
Members Minutes Paisa Centimeters Inches
Public void gettime() void input() void getdata() void getdata()
Members void display() void show() void putdata() void putdata()

6. Do debugging exercises (EB 6th edition)


Chap-5 (5.1 to 5.6)
7. Add appropriate constructors (Default, Parameterized, default
arguments, copy constructor) in all programs.
8. W.A.P. with dynamic initialization of constructors for long term fixed
deposit system.
Private members: principal amount
Years
Interest rate
Return value of amount
9. Write dynamic constructor for string.
10. Construct 2-d array using dynamic constructor.
11. W.A.P for destructor.

You might also like