CPP Rishita
CPP Rishita
1 What is Class? Explain how function is defined inside the class and outside the CO.2
class with example?
2 Assume the, “Customer, Account, Transaction, and Loan” are different classes of CO.2
an online banking system. According to UML class diagram representation do
the following:
a) Represent class diagram including attributes and operations with possible
visibility modes for all these classes.
b) Show association relationship between “Customer and Account”, “Customer and
Loan” with multiplicity and association name.
c) Show possible specialization for the class account.
3 Discuss the significance of a constructor and destructor in C++. What happens if CO.2
a destructor is not explicitly defined in a class.
4 Write a program to narrate use of inline functions. Also discuss whether the CO.2
request to make a function as inline is always granted by the compiler?
5 Create the c++ program code to class called 'student' with CO.2
The program asks the user to enter name and marks. Then calc_media ()
calculates the media note and disp () display name and total media mark on
screen in different lines.
6 With example explain Friend class and Friend function. What are the properties CO.2
of friend function
7 Explain public, private and protected access specifiers and show their visibility CO.2
when they are inherited as public, private and protected
8 Explain the concepts of “Polymorphism” and “Function overriding” related. CO.3
Write a C++ program in support of your answer to override area () function
which calculates area of circle in parent class and area of square in child class.