Uploaded by Umesh Kumari

OopsLab

advertisement
Lab 9:
Create the class TIME to store time in hours and minutes. Write a friend
function to add two TIME objects.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab7.cpp
Lab 10:
Create two classes DM and DB. DM stores the distance in meter and
centimetres and DB stores the distance in feet and inches. Write a program to
add object of DM with the object of DB class.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab8.cpp
Lab 11:
Program to overload unary operator.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab16.cpp
Lab 12:
Program to overload binary operator.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab17.cpp
Lab 13:
Program to show multiple inheritance.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab12.cpp
Lab 14:
Program to show multilevel inheritance.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab13.cpp
Lab 15:
Program to show hybrid inheritance.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab14.cpp
Lab 16:
Program to show the concept of run time polymorphism using virtual function.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab18.cpp
Lab-17:
Write a program to create an abstract class named shape that contains an
empty method named number of sides (). Provide three classes named
Trapezoid, Triangle and Hexagon such that each of the classes inherits the class
shape. Each one of the classes contains only the method number of sides ()
that shows the number of sides in the given geometrical figures.
Code:
Output:
GitHub Link:
https://github.com/UmeshKumari-202128/oopsLabAssignments/blob/main/Lab9.cpp
Download