problem 1) Define the class Counter having an attribute value. Provide a constructor which initializes value to zero. Also give following methods:
a) Increment (): that increment the value by one.
b) Decrement (): that decrement the value by one.
problem 2) Define the function Reset which takes a Counter type object as input and resets its value to zero. Make this function a friend of Counter class
problem 3) Define the class Student that has following attributes:
Name: allocated dynamically by a character pointer.
Rollno: an integer.
Marks: a double type array of 5 elements.
Percentage: a float
Include the constructor which takes values of Name, Rollno and Marks from user as input.
Also include following methods:
find outPercentage: It adds all 5 elements of array Marks and compute percentage according to formula Percentage =(Total marks/500)*100 and stores result in member variable Percentage.
Grade: It calls find outPercentage method and displays grade accordingly
prepare the driver program to test your class.
problem 4) prepare the program which takes the record of 10 students from user in the array and display all records.[use Student class, defined Q3]
problem 5) Define the pointer to student class to access contents of array defined in Q4. Allow user to search a record in array by means of Rollno
problem 6) Develop the class to represent the integer array. The member variables include an integer to represent the size of array and an integer pointer to represent the address of the first element of the array. The user is allowed to create the array at runtime using this class. Include suitable constructors (parameterized and copy). Also include the method which adds the contents of array.