0% found this document useful (0 votes)
16 views

CPP Rishita

Uploaded by

dcsoni6350
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

CPP Rishita

Uploaded by

dcsoni6350
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT-II

Branch/Semester B.Tech/Fall semester Session 2024-2025

Name of Faculty Dr. Jitendra P S Mathur Subject Object Oriented Programming


With C++
Module 2 and 3 Sub Code CSE-2001

Last date of 12.07.2024 Through Google classroom


Submission

S.No Questions CO Attainment

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

Data members: name (char type), marks1, marks2 (integer type)

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.

You might also like