Write an OBJECT-ORIENTED PROGRAMMING using class Set to display the content of an array named set...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an OBJECT-ORIENTED PROGRAMMING using class Set to display the content of an array named set in original order and reverse order and compute the set's standard deviation. 1) The set has a size of 8 and the elements are (5,10,15,20,25,30,35,40). The program must have three programmer defined functions to perform the above- mentioned tasks and the function prototypes are as follow: void numbersinset(int set[], int SIZE); void numbersinreverse(int set[], int SIZE); float calculateSD(int set[], int SIZE); The standard deviation can be calculated using the following equation: 0= The numbers in set are: 5 10 15 20 25 30 35 40 |Σ(χι – μ)2 N o = standard deviation of the set array N = the size of the set array x₁ = each value from the set array μ = the mean of the set array All the functions must be called from the main function using class and objects. You must use pointers in all of the functions to access the array elements. The program output should look as follow: The numbers in the reverse order: 40 35 30 25 20 15 10 15 The standard deviation is: 22.5 Write an OBJECT-ORIENTED PROGRAMMING using class Set to display the content of an array named set in original order and reverse order and compute the set's standard deviation. 1) The set has a size of 8 and the elements are (5,10,15,20,25,30,35,40). The program must have three programmer defined functions to perform the above- mentioned tasks and the function prototypes are as follow: void numbersinset(int set[], int SIZE); void numbersinreverse(int set[], int SIZE); float calculateSD(int set[], int SIZE); The standard deviation can be calculated using the following equation: 0= The numbers in set are: 5 10 15 20 25 30 35 40 |Σ(χι – μ)2 N o = standard deviation of the set array N = the size of the set array x₁ = each value from the set array μ = the mean of the set array All the functions must be called from the main function using class and objects. You must use pointers in all of the functions to access the array elements. The program output should look as follow: The numbers in the reverse order: 40 35 30 25 20 15 10 15 The standard deviation is: 22.5
Expert Answer:
Answer rating: 100% (QA)
To solve the problem in the imagewe can use the following steps Create a class called Set This class should have the following member variables set An ... View the full answer
Related Book For
Posted Date:
Students also viewed these computer network questions
-
Write a program in C that will display an integer multiplication table. It will take two inputs from the user the X and Y which is the number of rows and columns for the table. For example, if the...
-
On July 1, Year 1, the board of directors of All Seasons Sports, Inc. voted to dispose of the Ski & Snowboard operating segment of the company. On that date, the carrying value of the segment was...
-
Desmond died on 18 July 2017, having made no transfers in the previous seven years. He left his entire estate to his wife Emily, including the family home valued at 420,000. Emily died on 9 May 2020,...
-
Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital signals are used? Assume a noiseless channel.
-
Heat is transferred from a TER at 1500 K to a TER (thermal energy reservoir) at 400 K at a rate of 10 kW. If the atmospheric temperature is 300 K, determine the rate at which energy (a) leaves the...
-
List three ways to get input from the console and convert that input to the desired data type.
-
One of PLE's manufacturing facilities produces metal engine housings from sheet metal for both mowers and tractors. Production of each product consists of five steps: stamping, drilling, assembly,...
-
Write a three page paper on Compare and contrast Online Analytic Processing (OLAP) and Online Transaction Processing (OLTP); also discuss Codds rules for TP databases and OLAP databases. Cite any...
-
TechGlobe Inc. is a leading technology company specializing in software development. Lisa, the CEO of TechGlobe, has identified a potential acquisition opportunity in the market. The target firm,...
-
Decide as a couple whether to save for a 10% or 20% down payment on the house over 7 years. Whether you decide on 10% or 20% for the down payment, remember to add the 2% for closing costs. After you...
-
Jane Smith, MD, has had a great year in her pediatrics practice, and she has cash that she wants to invest. Her financial adviser suggests she buy a seven-year, $1,500 par value bond with an annual...
-
What is the present value of a perpetuity of $100 per year if the appropriate discount rate is 7 percent? Suppose that interest rates doubled in the economy and the appropriate discount rate is now...
-
A foreign exchange dealer in Tokyo provides the following quotes for spot exchange and 3-month forward exchange between the Malaysian ringgit (MR) and the U.S. dollar. a. In New York, 3-month U.S....
-
St. Vincents Health Care has a target capital structure of 35 percent debt and 65 percent equity. Its cost-of-equity (fund capital) estimate is 13.5 percent and its cost-of-tax-exempt-debt estimate...
-
Calculate the after-tax cost of debt for the Wallace Clinic, a for profit healthcare provider, assuming that the coupon rate set on its debt is 11 percent and its tax rate is a. 0 percent. b. 20...
-
Assume the role of a marketing communication consultant hired to plan an integrated digital marketing campaign for the ICOME2022 conference. The Faculty of Management Studies has already launched the...
-
Determine by direct integration the values of x for the two volumes obtained by passing a vertical cutting plane through the given shape of Fig. 5.21. The cutting plane is parallel to the base of the...
-
Laramie Park District has files of participants in its summer and winter programs this year. Each file is in participant ID number order and contains additional fields for first name, last name, age,...
-
A mobile phone app allows a user to press a button that starts a timer that counts seconds. When the user presses the button again, the timer stops. Draw a flowchart or write pseudocode that accepts...
-
Your downloadable files for Chapter 7 include a file named DEBUG07-04.jpg that contains a flowchart with syntax and/or logical errors. Examine the flowchart, and then find and correct all the bugs.
-
When an organization decides to replace a legacy system, it usually chooses a contemporary database system over a relational file-based system. But each type of system has its own advantages and...
-
Complete the following sentences: system is also called a distributed data and application client/server system or
-
The textbook states that "data is a resource that must be controlled and managed." Explain this statement, and indicate whether you agree of not, and why.
Study smarter with the SolutionInn App