The document summarizes a student's experiment on object oriented programming. It discusses function overriding using an AVERAGE() function in C++. Function overriding is required when a derived class needs to perform an added or different task compared to the base class function. It also defines nesting of classes as a class declared within another enclosing class, with the same access rights. The student demonstrates inheritance and overriding, and learns how to use inheritance and the concept of overriding through the experiment.
The document summarizes a student's experiment on object oriented programming. It discusses function overriding using an AVERAGE() function in C++. Function overriding is required when a derived class needs to perform an added or different task compared to the base class function. It also defines nesting of classes as a class declared within another enclosing class, with the same access rights. The student demonstrates inheritance and overriding, and learns how to use inheritance and the concept of overriding through the experiment.
The document summarizes a student's experiment on object oriented programming. It discusses function overriding using an AVERAGE() function in C++. Function overriding is required when a derived class needs to perform an added or different task compared to the base class function. It also defines nesting of classes as a class declared within another enclosing class, with the same access rights. The student demonstrates inheritance and overriding, and learns how to use inheritance and the concept of overriding through the experiment.
Semester: 2nd Date of Performance:03-04-22 Experiment No.6
1.Aim/Overview of the practical:
To complete worksheet 2.2.
2.Task to be done: (a) Write a C++ program to represent the function overriding using AVERAGE () function.
(b) Why function overriding is required?
(c) What is nesting of classes?
3.Code for experiment/practical: a. b. Overriding is needed when derived class function has to do some added or different job than the base class function. c. A nested class is a class which is declared in another enclosing class. A nested class is a member and as such has the same access rights as any other member. 4.Result/Output/Writing Summary:
5.Learning outcomes (What I have learnt):
1. Learn how to use inheritance.
2. Leaned about the concept of overriding.
Evaluation Grid:
Sr. No. Parameters Marks Obtained Maximum Marks
1. Demonstration and Performance 5 2. Worksheet 10 3. Post Lab Quiz 5