Write a program having following classes
Player (Base Class)
Members:
Cricket player (Derived Class)
Members:
Hockey player (Derived Class)
Members:
Football player (Derived Class)
Members:
Write a basic while loop with a function code in the program that sums a stream of integers (input from the keyboard) and continues to do so while the integer entered is not -999. Ask the user to enter values in the range of 1 to 10000 or -999 to quit.
Design four classes: Student, Exam ,Sports and Result. The Student class has data members such as reg. number, name. Create Exam by inheriting the Student. The Exam class adds data members representing the marks scored in 3 subjects. Create Sports by inheriting the Student. The Sports class adds data members representing the marks scored in indoor and outdoor games. Derive the Result from the Exam , Sports and Result has its own data member of Total mark. Write an interactive program with appropriate member functions to model this relationship.
create a person class with name as it's data member . provide 4 functions getname() to get input from user and putname() to display output. Write two virtual functions getdata() and outstanding() where both these functions takes no argument and getdata() returns no value but outstanding () returns a Boolean value. Derive student and professor from person.student class should contain GPA as its float type data member and overrides the virtual functions appropriately .in professor class provide number of publications as data member and overrides the virtual functions appropriately. write a main program to declare an array of pointers to person object and depending on the choice from user create a student object or professor object and store it in person array for n persons. display the details along with whether the person is outstanding or not
Create a class called bMoney. It should store money amounts as long doubles. Use the function ms_to_ld() to convert a money string entered as input into a long double, and the function ld_to_ms() to convert the long double to a money string for display. You can call the input and output member functions getmoney() and putmoney().
Overload the operators +,-,*,/ appropriately.
create a class Matrix the stores it in a safe 2D array .that is it it should check for array index bounds .a constructor should allow the programmer to specify the actual dimensions of the matrix. define number functions : putel() for taking 3 argument row index , column index and the element storing it in the corresponding location. getel() for taking 2 arguments row and column indexes and returns the elements from that location . overload the operators +,-,and * appropriately
Create a class angle that includes three member variables: an int for degrees, a float for minutes, and a char for the direction letter (N, S, E, or W). Write member functions to get input from user, to display the output in 120.36°N format and use a constructor to initialise the object. Write a main() program for demonstrating the above
create a structure called print to store x and y co-ordinate values write functions to get co-ordinate values .calculate the distance between two points in to display the result .write a main program to get the input from the user repeatedly and calculate the distance between every successive points and then find the total distance also
write a function with no argument that displays a message telling howmany times it has been called. write a main program that calls this function atleast 10 times .don't use external variable. write a c++ program