Object Oriented Programming
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Attempt any two questions: (2 × 10=20)
Write down the features of object oriented programming language and explain.
Differentiate between single inheritance and multiple inheritance? Imagine a college hires some lectures. Some lectures are paid in period basic, while others are paid in month basic. Create a class called lecture that stores ID and name of lectures. From this class derive two classes: part time, which adds payperhr(type float): and full time, which adds paypermonth(type float). Each of these three classes should have a readdata() function to get its data from user at the key board and printdata() function to display the data.
Write a main() program to test the Full time and Part time classes by creating instance of them asking the user to fill their data with readdata () and display the data with printdata().
Why data conversion is needed? Write a program to convert kilogram into gram using user define to user define data conversion.(1 kg = 1000 gm).
Attempt any eight questions: (8 × 5=40)