Create a class Student which store the name and roll no. of a student. Create another class Marks which inherits class Student and store the marks of 3 subjects. Create Class Result which inherits class Marks and store the information of a student and display name, roll and total marks of a student.
Define a class Calculator ,which has method for basic functionality like add, sub, mul, divde. Define another class Calc which inherits Calculator and add some method to like sin, cosine . WAP to demonstrate the working of Inheritance.
Create a class Student which store the name and roll no. of a student. Create another class Marks which inherits class Student and store the marks of 3 subjects, store the information of a student and display name, roll and total marks of a student. Use super keyword to take input.
Create a class Employee which has two data memeber name and id and a funtion to take input. Derive two classes "Regular" and "Part_Time". In Regular class, calculate the gross salary using Formula, Gross salary = Basic Salary+HA+DRA,where HA and DRA should be stored as static data member of class. In Part_Time class, Calculate the salary of Part_Time Employee using Formula Gross salary = Pay per hrs * no. of hrs. where pay per hrs is should be stored as static const.