Create a class student which stores name, roll number and age of a student. Derive a
class test from student class, which stores marks in 5 subjects. Input and display the
details of a student.Extend this program to include a class sports, which stores the marks in sports activity.
Derive the result class from the classes ‘test’ and ‘sports’. Calculate the total marks and
percentage of a student.
Create a class student which stores name, roll number and age of a student. Derive a
class test from student class, which stores marks in 5 subjects. Input and display the
details of a student.Extend this program to derive a class from result from class ‘test’ which includes
member function to calculate total marks and percentage of a student. Input the data for a
student and display its total marks and percentage.
The following program is supposed to allocate nodes, put them into a linked list, print them out and then destroy them. Fix the bugs in the program and rewrite the code. Your program should have complete implementation required to run the following function. Take dummy data execute it, take snap shot and paste it in the document. struct linkedList{ int number; linkedList* next; }; void AddNode() { linkedList* head=NULL; linkedList* current; for(int i=0;i<10;i++){ current = new linkedList; current->number = i; current.next = head; head = current; } while(head->next!=NULL){ cout << head->number << endl; current = head->next; delete current; head = current; } return 0; }