i. Design a class that has an array of floating-point numbers. The constructor should accept an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
i 1 contents of Numbersh ifndef NUMBERSH define NUMBERSH include using namespace std class Numbers private double arr int size public constructor Numb... View the full answer
Related Book For
Elementary Statistics Picturing the World
ISBN: 978-0321911216
6th edition
Authors: Ron Larson, Betsy Farber
Posted Date:
Students also viewed these programming questions
-
A standard roulette wheel has an array of numbered compartments referred to as "pockets." The pockets are red, black, or green. The numbers 1 through 36 are evenly split between red and black, while...
-
A standard roulette wheel has an array of numbered compartments referred to as "pockets." The pockets are red, black, or green. The numbers 1 through 36 are evenly split between red and black, while...
-
Write a method called sumArray that accepts an array of floating point values and returns the sum of the values stored in the array.
-
Mango Designs began selling its custom furniture on June 1, 2020. At the end of the month, the special journals showed the following results. Other information you will need is as follows: ? Interest...
-
For the conditions of Exercise 12 and the data in Table 11.2, determine the value of R2, as defined by Eq. (11.5.26).
-
A volcano launches a lava bomb straight upward with an initial speed of 28 m/s. Taking upward to be the positive direction, find the speed and direction of motion of the lava bomb (a) 2.0 seconds (b)...
-
Let us consider the PDE with terminal condition In order to apply the representation theorem, we observe that \(r=0\), \((x t)=\), and , so that the underlying stochastic process boils down to a...
-
Margrethe and Charles Pyeatte, a married couple, agreed that she would work so that he could go to law school and that when he finished, she would go back to school for her masters degree. After...
-
Explain how you would create a culture of innovation within a Company. What leadership strategies would you employ to encourage innovation and creativity among team members?
-
Steve and Cher put $2,400 into a college fund every year for their son, Don, on his birthday, with the first deposit one year from his birth (at his very first birthday). The college fund has a...
-
b. My neighbour from end of my street, when he leaves for work, passes in front of my house at 36km/h but still accelerates constantly at a rate (acceleration) given by a = 6t. Knowing that it took...
-
The end of the semester is a good time to think about your math, accounting, and Excel skills. Excel is widely considered a basic skill requirement for accounting and finance jobs. Discussion...
-
Sue plans to save $4,500, $0, and $5,500 at the end of Years 1 to 3, respectively. What will her investment account be worth at the end of the Year 4 if she earns an annual rate of 4.15 percent?
-
An amusement park charges $25.00 per ticket for children under 12 years of age and $50.00 per ticket for anyone 12 years of age or older. The firm has estimated that the price elasticity of demand...
-
Which Organizational citizenship behavior or task performance more important, why?
-
Write a thesis statement based on the two stories Paul's Case and To Room Nineteen including the following categories : how paul and susan intially lived their lives as per societal norms; their self...
-
Article Summary : read the article "Arbitration pros and cons" and summarize two (2) pros and two (2) cons https://www.nolo.com/legal-encyclopedia/arbitration-pros-cons-29807.html
-
Wilsons Auto Repair ended 2011 with Accounts Receivable of $85,000 and a credit balance in Allowance for Uncollectible Accounts balance of $11,000. During 2012, Wilsons Auto Repair had the following...
-
An education publication claims that the mean expenditure per student in public elementary and secondary schools is more than $12,000. You want to test this claim. You randomly select 16 school...
-
Sixty-seven percent of adults ages 55 and older want to reach their 100th birthday. You randomly select seven adults ages 55 and older and ask them whether they want to reach their 100th birthday....
-
The weights (in pounds) of all U.S. presidents since 1952 Find the range, mean, variance, and standard deviation of the population data set. 173 175 200 173 160 185 195 230 190 180
-
A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images...
-
Design a number guessing game program. The program should generate a random number and then ask the user to guess the number. Each time the user enters his or her guess, the program should indicate...
-
As an illustration of the difficulty in identifying monopolies, try to decide which of the following are monopolies: a train operating company; your local evening newspaper; the village hairdresser;...
Study smarter with the SolutionInn App