answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lilavasa [31]
1 year ago
12

Write the definition of a function named averager that receives a double parameter and return-- as a double -- the average value

that it has been passed so far. So, if you make these calls to averager, averager(5.0), averager(15.0), averager(4.3), the values returned will be (respectively): 5.0, 10.0, 8.1. Hint: use a static local variable to track the average of all the numbers been called.
Computers and Technology
1 answer:
lys-0071 [83]1 year ago
4 0

Answer:

Following are the definition of function  

double averager (const double &x)  // function definition

{

static double z = 0.0;  // variable declaration

static size_t c = 0;

 c=c+1;  // increment of c by 1

z =z+ x;  // adding value  

return z /c ;   // return average  

}

Explanation:

Following are the description of statement  

  • Create a function averager of double type that holds a parameter "x" of the double type .
  • In this function we declared a variable "z" of a static double type that value is initialized by 0.
  • The static variable is used to retain value.
  • Declared a variable "c" of size_t type that holds a value 0 .
  • After that increment the value of c by 1 .
  • adding the value of "z" variable to the "x" and storing the result into the z variable.
  • Finally return the average value  
You might be interested in
Jonah’s friend reminded him to check his report against the rubric provided by their teacher. His friend sent him these instruct
Semenov [28]

Answer:

Steps 2 and 3 needs to be switched.

Explanation:

e2020

8 0
1 year ago
Jefferson is interested in starting his own business. He plans to borrow money from the local bank in order to finance the busin
sweet [91]
A business plan and a <u>financial plan</u> to show the both his plan to make money, and how much money he will make, spend, use.
8 0
1 year ago
Read 2 more answers
___________ is an approach to boundary spanning that results from using sophisticated software to search through large amounts o
snow_tiger [21]

Answer: Business intelligence

Explanation:

Most of the enterprises and organizations collects huge amount of data through the use of MIS. These data can be based on any aspect of the business. But the collection of such large sets of data is useless until and unless there is a business intelligence associated with it. the work of business intelligence is to use software tools for analysis of the collected data so that it could be useful for enterprise or company to look for patterns and trends in the market.

The outcome of such business intelligence is very helpful particularly to managers, executives for taking particular decisions in the greater interest of the company.

So we can say, business intelligence is an approach to boundary spanning that results from using sophisticated software to search through large amounts of internal and external data to spot patterns, trends, and relationships that might be significant.

4 0
1 year ago
Write a second constructor as indicated. Sample output: User1: Minutes: 0, Messages: 0 User2: Minutes: 1000, Messages: 5000
Mashcka [7]

Complete Question:

Write a second constructor as indicated. Sample output:User1: Minutes: 0, Messages: 0User2: Minutes: 1000, Messages: 5000// ===== Code from file PhonePlan.java =====public class PhonePlan { private int freeMinutes; private int freeMessages; public PhonePlan() { freeMinutes = 0; freeMessages = 0; } // FIXME: Create a second constructor with numMinutes and numMessages parameters. /* Your solution goes here */ public void print() { System.out.println("Minutes: " + freeMinutes + ", Messages: " + freeMessages); return; }}

Answer:

The second constructor is given as:

//This defines the constructor, the name has to be the same as the class //name

PhonePlan(int numOfMinutes, int numberOfMessages) {

this.freeMinutes = numOfMinutes;

this.freeMessages = numberOfMessages

}

Explanation:

The second constructor is defined using java programming language.

  1. The given class has two constructors This is called "Constructor Overloading) which implements polymophism
  2. In the second constructor that we created, we pass in two arguments of type integer numOfMinutes and numberOfMessages.
  3. In the constructor's body we assign these values to the initially declared variables freeMinutes and freeMessages
6 0
1 year ago
What should businesses do in order to remain competitive under the current Cloud<br> landscape?
Kamila [148]

Answer:

Cloud Landscape

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits

Explanation:

The most successful organisations carefully plan out a multiyear effort to improve their cloud adoption, focusing on multiple streams of work across several stages of maturity.

Cloud computing governance is difficult even when only one cloud provider is involved, and it becomes even more difficult as organisations move toward multi cloud.

Continuous workload placement analysis involves reassessing workloads at a regular cadence, evaluating whether the current execution venue sufficiently meets the organization’s needs and if migrating to an alternative model provides higher value without adding significant risk to the organization’s operations

They must evangelize the benefits of cloud computing to company executives in order to assist them in developing and extracting business benefits that will give them a competitive advantage and increase profits.

8 0
1 year ago
Read 2 more answers
Other questions:
  • Gaven's instructor told him to include a personal statement in his work portfolio. Why did his instructor recommend including a
    6·1 answer
  • The elements in a string type array will be initialized to ____.?
    10·1 answer
  • Mechanical advantage is the ratio of the force required to move a load divided by______
    12·1 answer
  • An mp3 takes up about 16 kilobytes of memory per second of music. if you owned a one terabyte hard drive and filled it with only
    15·1 answer
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Select the correct answer. James is a sales analyst of a departmental store chain. He checked the sale records for the past 12 m
    6·2 answers
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • You can deal with gaps in an PHP array in all but one of the following ways. Which one is it? a. Use the array_values() function
    14·1 answer
  • A large Internet merchandise provider determines its shipping charges based on the number of items purchased. As the number incr
    6·1 answer
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!