LAB#7 OOP LAB-Section-C Date:16-12-2020 Topics Covered
LAB#7 OOP LAB-Section-C Date:16-12-2020 Topics Covered
LAB#7 OOP LAB-Section-C Date:16-12-2020 Topics Covered
OOP LAB-Section-C
Date:16-12-2020
Topics covered:
Problem Statement 1:
Write a Student class that can store Name, Student ID, Program, and marks of three different
subjects as S1, S2 and S3 Declare all the variable as private. Write a Friend class calculate to
calculate and store the GPA of the student. And then write suitable code to test your program.
Use formula (S1+S2+S3)/12 to calculate the GPA.
Problem Statement 2:
Write a base class Shape that has private data member width and height and public member
function setWidht(int) and setHeight(int).Write a friend class Rectangular that has a method to
calculate the area of rectangular.
Problem Statement3 :
To write a c++ program to get student details, total marks & average