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; }
R=v2 sin2&/g
v = 30.0 (speed of the throwing), g = 9.8 (gravity), and $= angle in radians
User may insert an angle above or equal 45° and below 60° as the highest angle.
Then the program should calculate the horizontal range of the projectile motion (R) for each angle until the angle become 35°.
Consider the gravity (g) as a constant.
You are required to calculate the 𝜃 in radians by using the given formula (PI = 3.14286 which is a constant).
Use the necessary header files to do the calculation.
Write a C++ program to calculate time dilation (t) in motion, when the speed of the moving objects (v) is given by the user. The given below is the equation to calculate the time dilation.
v = speed of the moving object, c = 15000 ms-1(speed of light), and t0 = 75 s (time in observers own frame of reference)