Question: i. Design a class that has an array of floating-point numbers. The constructor should accept an integer argument and dynamically allocate the array to
i. Design a class that has an array of floating-point numbers. The constructor should accept an integer argument and dynamically allocate the array to hold that many numbers. The destructor should free the memory held by the array. In addition, there should be member functions to perform the following operations: Store a number at any index of the array Retrieve a number from any index of the array Return the highest value stored in the array Return the lowest value stored in the array Return the average of all the numbers stored in the array ii. Consider the following details of all classes (5) Person Employee Student Administration Academic Dean/HOD A person can be an employee or a student. An employee may have rights of admin officer or of academic officer. These class hierarchies represent multi-level inheritance. However, a Dean or Head of Department(HOD) may have rights to modify the status already defined by an administrator academic officer. Implement all these classes with appropriate data members and proper suitable functions and within the main function, create instances of all classes and test the described working of all these classes.
Step by Step Solution
There are 3 Steps involved in it
i 1 contents of Numbersh ifndef NUMBERSH define NUMBERSH include using namespace std class Numbers private double arr int size public constructor Numb... View full answer
Get step-by-step solutions from verified subject matter experts
