The program prompts the user for five to ten numbers all on one line, separated by spaces, calculates the average of those numbers, and displays the numbers and their average to the user.

The program uses methods to:

1) get the numbers entered by the user all on one line separated by spaces;

2) calculate the average of the numbers entered by the user; and

3) print the results.

The first method should take no arguments and return a String of numbers separated by spaces.

The second method should take a String as its only argument and return a double (the average).

The third method should take a String and a double as arguments but have no return value.

IF user input is: 20 40 60 80 100

Answers

Answer 1

Answer:  

import java.util.Scanner;  

public class AverageDemo

{  

public static String getNumbers()

{

 

 String numbers;  

 Scanner scn = new Scanner(System.in);  

 System.out.println("Enter five to ten numbers all on one line, separated by spaces: ");

 numbers = scn.nextLine();

 return numbers;

}  

public static double calcAverage(String numbers)

{

 String[] values = numbers.split(" ");

 double total = 0;  

 for (int i = 0; i < values.length; i++)

 {

  total += Integer.parseInt(values[i]);

 }  

 if (values.length == 0)

  return 0.0;

 else

  return (total / values.length);

}  

// Method definition of printResults: print the results

public static void printResults(String numbers, double average)

{

 System.out.printf("\nThe average of the numbers %s is %.2f\n", numbers, average);

}  

// main method

public static void main(String[] args)

{

 // Call the methods

 String numbers = getNumbers();

 double average = calcAverage(numbers);

 printResults(numbers, average);

}

}

Output:

The Program Prompts The User For Five To Ten Numbers All On One Line, Separated By Spaces, Calculates

Related Questions

you’ve found an image you want to insert into your slide presentation you want to make the image look more gray so that it looks like an older image what would you need to adjust

Answers

image grayscale

format : format options: recolor : then pick the color

Which of these functions may be used with positional arguments? Select four options.

AVERAGE
COUNTIF
COUNT
SUM
MAX

Answers

Answer:

AVERAGE

COUNT

SUM

MAX

Explanation:

The functions that may be used with positional arguments include:

AVERAGE

COUNT

SUM

MAX

The basic functions formulae include SUM, AVERAGE, COUNT, MAX and MIN.

SUM: This is the sum total of all the numbers in the rows.

COUNT: This is the used to count the range of cells that contains numbers.

AVERAGE: This is the average of all the numbers in the rows.

MIN: This is the lowest number in the rows.

MAX: This will return the highest number that is found in the set of values.

It should be noted that the COUNTIF is not used with positional arguments.

which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) shortest job scheduling , (c) priority scheduling , (d) round robin scheduling​

Answers

Answer:

is correct answer

(a)first come first serve

Explanation:

Which information is required when designing a field? check all that apply.

Answers

Answer:

Explanation:

dimensions or calculation

Which is not true about climatic normals?

Multiple choice question.

A)
They can differ from daily weather conditions.

B)
They are gathered at one location.

C)
They are averaged over a 30-year period.

D)
They describe average conditions.

Answers

Answer:

I think c is correct answer

Explanation:

hope it's help yu

What is ABC computer?​

Answers

Answer: The Atanasoff–Berry computer was the first automatic electronic digital computer. Limited by the technology of the day, and execution, the device has remained somewhat obscure. The ABC's priority is debated among historians of computer technology, because it was neither programmable, nor Turing-complete.

Explanation:

Based on the code you created in this Unit, propose a way to re-use most of the code (with different information in the variables like "city" and "rates") for a part of a similar app that isn't related to parking at all. The app can be small-scale or large scale, but should be clearly connected to the code you've written (you can defend your proposal if the connection is not immediately obvious).

Answers

Answer:

Is this a question or an answer

Which of the following statements about software licensing are true? Select 3 options.

A. Both proprietary and open-source software can be modified and redistributed.

B.Free software does not come with a license.

C.Open-source software allows developers to create new software more quickly and inexpensively.

D. Proprietary software licenses are more restrictive than open-source software licenses.

E. An end-user license agreement protects both the owner of the software and the purchaser.

Answers

Using software licensing concepts, it is found that the correct options are given by:

A. Both proprietary and open-source software can be modified and redistributed.

C.Open-source software allows developers to create new software more quickly and inexpensively.

D. Proprietary software licenses are more restrictive than open-source software licenses.

------------------------

A proprietary software is owned by an enterprise(can be both an individual and company) that produced it, while a free software means that anyone can make changes in it.Changes can also be made in a proprietary software, just an authorization from it's owner is needed, and thus, option A is correct.Both types have licenses, and thus, option B is incorrect.Since anyone can change it, in an open-source software the developers can create new software quickly, while proprietary licenses are more restrictive, thus, options C and D are correct.An end-user license agreement protects the owner of the software from it being changed without permission, that is, just the owner, thus option E is incorrect.

A similar problem is given at https://brainly.com/question/14721871

Answer: these are the correct answers

Explanation:

You want to add a new Product and Services entry to your client's QuickBooks Online company. The service is installation of a server that doesn't include the cost of the hardware. Here are some steps for getting the job done. 1. Select the Gear icon, select Products and Services, then select New 2. _____________________________________________ 3. In the Name field, type Server installation 4. In the Sales information field, type Server installation 5. Sale price/rate is $1250 6. In the Income Account drop-down, select Service/Fee Income 7. Select Save and close

Answers

Answer:  

The correct answer is Option 3: "Select Service"  

You have to select "Service" in the Second Step.  

Only after that, you'll be able to name the Service in the following step.  

Other options are invalid for a given question.

Define Artificial Intelligence(AI) in 5 sentence​

Answers

Answer:

Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. ... The ideal characteristic of artificial intelligence is its ability to rationalize and take actions that have the best chance of achieving a specific goal.

how computer network reduce the cost of computer hardware? explain with example.​

Answers

Answer:

The biggest advantage of computer network is that the hardware components such as printers memory etc. can be shared by multiple computers. Hence it reduces the hardware cost of an organization

Answer:

One main method computer networking reduces the cost of computer hardware through the sharing of hardware component and resources including printers, faxes, memory space for data storage, processor, graphics capabilities, and internet access devices both locally, within a building and across sites

Computer network allows the sharing of a single resource mentioned above with several other computers, such that a single unit of each resource can be used by members of the same organization

Computer network also reduces the cost of additional space required where each computer is connected to its own components

Explanation:

What defines interactive media? The user must play a role in writing the content of the media. The user must do something that determines what happens next. The user must help design the overall look and feel of the presentation. The user must provide feedback after using the media.

Answers

Answer:

What Is Interactive Media?

Interactive media is a method of communication in which the program's outputs depend on the user's inputs, and the user's inputs, in turn, affect the program's outputs. Simply put, it refers to the different ways in which people process and share information, or how they communicate with one another. Interactive media allows people to connect with others—whether that's people or organizations—making them active participants in the media they consume

Answer:

The user must do something that determines what happens next.

It is B.

You make a purchase at a local hardware store, but what you've bought is too big to take home in your car. For a small fee, you arrange to have the hardware store deliver your purchase for you. You pay for your purchase, plus the sales taxes, plus the fee. The taxes are 7.5% and the fee is $20. (i) Write a function t(x) for the total, after taxes, on the purchase amount x. Write another function f(x) for the total, including the delivery fee, on the purchase amount x. (ii) Calculate and interpret (f o t)(x) and (t o f )(x). Which results in a lower cost to you

Answers

Answer:

[tex]f(x) = 1.075x[/tex]

[tex]t(x) = x + 20[/tex]

[tex](f\ o\ t)(x) = 1.075x + 21.5[/tex]

[tex](t\ o\ f)(x) = 1.075x + 20[/tex]

Explanation:

Given

[tex]Tax = 7.5\%[/tex]

[tex]Fee = \$20[/tex] -- delivery

Solving (a): The function for total cost, after tax.

This is calculated as:

[tex]f(x) = Tax *(1 + x)[/tex]

Where:

[tex]x \to[/tex] total purchase

So, we have:

[tex]f(x) = x * (1 + 7.5\%)[/tex]

[tex]f(x) = x * (1 + 0.075)[/tex]

[tex]f(x) = x * 1.075[/tex]

[tex]f(x) = 1.075x[/tex]

Solving (b): Include the delivery fee

[tex]t(x) = x + Fee[/tex]

[tex]t(x) = x + 20[/tex]

Solving (c): (f o t)(x) and (t o f)(x)

[tex](f\ o\ t)(x) = f(t(x))[/tex]

We have:

[tex]f(x) = 1.075x[/tex]

So:

[tex]f(t(x)) = 1.075t(x)[/tex]

This gives:

[tex]f(t(x)) = 1.075*(x + 20)[/tex]

Expand

[tex]f(t(x)) = 1.075x + 21.5[/tex]

So:

[tex](f\ o\ t)(x) = 1.075x + 21.5[/tex]

[tex](t\ o\ f)(x) = t(f(x))[/tex]

We have:

[tex]t(x) = x + 20[/tex]

So:

[tex]t(f(x)) = f(x) + 20[/tex]

This gives:

[tex]t(f(x)) = 1.075x + 20[/tex]

We have:

[tex](f\ o\ t)(x) = 1.075x + 21.5[/tex] ---- This represents the function to pay tax on the item and on the delivery

[tex](t\ o\ f)(x) = 1.075x + 20[/tex] --- This represents the function to pay tax on the item only

The x coefficients in both equations are equal.

So, we compare the constants

[tex]20 < 21.5[/tex] means that (t o f)(x) has a lower cost

the paint 3D program is used for drawing picture true or false​

Answers

Answer:

The answer is TRUE we use paint program to draw.

Explanation:

#swag

Answer is truee the paint 3d program is used for drawing pics

Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate conditional statement for this
please hurry i need urgent
please answer correct
or i will report

Answers

The algorithm is as follows:

1. Start

2. bottles = 0

3. While bottles != 500

3.1 Create bottle

3.2 bottle = bottle + 1

4. Switch off machine

5. Stop

Explanation:

This begins the algorithm

1. Start

This initializes bottles to 0

2. bottles = 0

The loop is repeated until 500 bottles is created

3. While bottles != 500

This creates a new bottle

3.1 Create bottle

This increments the number of bottles by 1

3.2 bottle = bottle + 1

This switches of the machine after all bottles are created

4. Switch off machine

End algorithm

5. Stop

THANKS

OUTPUT DEVICES 1. Match each output device on the left with the correct use on the right. Output device Use Multimedia A large monitor used by older computers Projector Used when checking the depth of water in a container Buzzer Used for outputting large posters, maps and plans Light A thin light weight monitor Wide format printer Used to make presentations to a large audience Dot matrix printer Used for producing mutli-part invoices CRT monitor Used as an alert on smartphones TFT/LCD monitor​

Answers

Answer:

hand

Explanation:

My name is Yoshikage Kira. I'm 33 years old. My house is in the northeast section of Morioh, where all the villas are, and I am not married. I work as an employee for the Kame Yu department stores, and I get home every day by 8 PM at the latest. I don't smoke, but I occasionally drink. I'm in bed by 11 PM, and make sure I get eight hours of sleep, no matter what. After having a glass of warm milk and doing about twenty minutes of stretches before going to bed, I usually have no problems sleeping until morning. Just like a baby, I wake up without any fatigue or stress in the morning. I was told there were no issues at my last check-up. I'm trying to explain that I'm a person who wishes to live a very quiet life. I take care not to trouble myself with any enemies, like winning and losing, that would cause me to lose sleep at night. That is how I deal with society, and I know that is what brings me happiness. Although, if I were to fight I wouldn't lose to anyone.

whats an MAR? lolz better not take my points #bonkers

Answers

Answer:

[tex]\huge\mathcal{\fcolorbox{aqua}{azure}{\red{✿ʏᴏᴜʀ- ᴀɴsᴡᴇʀ ♡❖}}}[/tex]

A Medication Administration Record (MAR, or eMAR for electronic versions), commonly referred to as a drug chart, is the report that serves as a legal record of the drugs administered to a patient at a facility by a health care professional. The MAR is a part of a patient's permanent record on their medical chart

▓▓▓▓▓▓▓✿▓▓▓▓✿▓▓▓▓▓▓▓

[tex]\boxed{\pmb{\green{\sf{MAR}}}}[/tex]

medication administration record:-

 A computer-generated schedule for administering medications to a patient for a defined period of time, including dosing, timing of administration and details about the physician’s orders.

▓▓▓▓▓▓✿▓▓▓▓✿▓▓▓▓▓▓▓▓

14. Applying formatting using the commands in the ribbon is called style
(page layout, override, justification)

Answers

Answer:

Override

Explanation:

Hope this helps

Prolog uses ____. Select one: a. lowercase for variable names, and uppercase for constants and functions b. uppercase for variable names, and lowercase for constants and functions c. lowercase for variable names and constants, and uppercase for functions d. uppercase for variable names and constants, and lowercase for functions

Answers

Answer:

b) uppercase for variable names, and lowercase for constants and functions  

Explanation:

Given

Programming language: prolog

Required

The case type for variables, constants and functions

In prolog,

Variable names begin with uppercase

e.g. Name, NAME

While constants and functions begin with lowercase

e.g. name, addnumbers()

Hence, (b) is correct

Using a combination of symmetric and asymmetric key encryption, Sofia sent a report to her home office in Indiana. She received an e-mail acknowledgement that her report had been received, but a few minutes later she received a second e-mail that contained a different hash total than the one associated with her report. This most likely explanation for this result is that

Answers

Group of answer choices.

A) the public key had been compromised.

B) the private key had been compromised.

C) the symmetric encryption key had been compromised.

D) the asymmetric encryption key had been compromised.

Answer:

C) the symmetric encryption key had been compromised.

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In Cyber security, encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext.

Typically, an information or data that has been encrypted can only be accessed and deciphered by an authorized user.

Some examples of encryption algorithms are 3DES, AES, RC4, RC5, and RSA.

Email encryption is the encryption and authentication of an email to protect the message therein from being read by any person other than the intended recipients. Thus, it protects the email from hacking or invasion by a third party.

Basically, when the message is signed with the sender's private key, the receiver can verify its authenticity using the sender's public key.

Also, encrypting the email message with the receiver's public key provides confidentiality.

In this scenario, the most likely explanation for this result is that the symmetric encryption key had been compromised.

Define Data communication​

Answers

Explanation:

Data transmission and data reception is the transfer and reception of data over a point-to-point or point-to-multipoint communication channel. Examples of such channels are copper wires, optical fibers, wireless communication channels, storage media and computer buses. 

are the exchange of data between two devices For data communications to occur, the communicating devices must be part of a communication system made up of a combination of hardware

Which of these is an example of an IT career? (ik I'm trash at this kinda stuff)


Select all that apply

A

game designer


B

network engineer


C

graphic designer


D

cashier

Answers

Answer:

not d

Explanation:

IT is info tech, so it's most likly a or c(I'mma go witn c), but then again b is possible, but c still sounds most reasonable(I think)

Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hires that need onboarding with user accounts. When Travis looks at all the existing account names, he notices there is no common naming system. Where should he look to try to give the new hires user accounts with proper naming conventions

Answers

Answer:

The company's account policy

Explanation:

If there's no common naming system, It's best to go with the company's account policy.

After completing initial diagnostic procedures and allocating system resources, a startup BIOS program checks for information about secondary storage devices that might contain the OS. The list of devices and the order in which they should be checked can be found and arranged in the CMOS setup utility. This option is commonly referred to as a:

Answers

Answer:

Boor sequence

Explanation:

What method is used to prevent the random number generator from always starting with the same number?

seed()

random()

randint()

initialize()

Answers

Answer:

seed()

Explanation:

Since computer random isn't actually random, and is a predetermined sequence of numbers, seed() allows us to create different sequences of numbers, and thus more randomized numbers.

Hope this helps!

Answer:

the answer is seed()

Explanation:

i took the assignment

(11011+1001) base 2
please slove this​

Answers

Answer:

Explanation:

We can convert both to base 10 first:

(1+2+8+16) + (1+8) = 36.

Converting back to base 2, we get

100100

Equi Technologies offers cloud computing services to several data centers around the world. It hosts services in the cloud, which can be accessed by clients through Equibrowse-a Web browser designed by Equi Technologies. In the context of cloud computing services, it is evident that Equi Technologies provides _____.

Answers

Answer:

The answer is "Software as a service".

Explanation:

The software license strategy permits access to the software via a remote server through subscription-based access to the software. Rather than installing software on each user's PC, SaaS lets them access applications via the Internet.

For a number of reasons, it could save you money. Purchase/installation costs and also ongoing maintenance and upkeep are avoided, which is the primary benefit. SaaS apps may be easily downloaded and managed without breaking the bank on hardware parts and upgrades.

What is the purpose of requirements gathering and analysis?

Answers

Answer:

The purpose of Requirements Analysis is to discover unknown requirements, i.e., to turn unknown requirements into known requirements. Users' needs that were not expressed during requirements gathering and elicitation can be uncovered through Requirements Analysis.

Explanation:

You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are applied from his or her roaming profile to any computer he or she signs in to. You think it's important for users to have this choice, but you'd like a consistent look for computers used for product demonstrations to customers. What's the best way to do this without affecting users when they sign in to other computers

Answers

Answer:

Log inSign up

Server Unit 5 Quiz

STUDY

Flashcards

Learn

Write

Spell

Test

Play

Match

You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are applied from his or her roaming profile to any computer he or she signs in to. You think it's important for users to have this choice, but you'd like a consistent look for computers used for product demonstrations to customers. What's the best way to do this without affecting users when they sign in to other computers?

Tap card to see the definition

Configure loopback policy processing in Computer Configuration. Configure the desktop settings in User Configuration and link the GPO to the OU containing the demonstration computers.

Tap again to see the term

You want to create policies in a new GPO that affect only computers with Windows 8 installed. You don't want to reorganize your computer accounts to do this, and you want computers that are upgraded to Windows 10 to fall out of the GPO's scope automatically. What can you do?

Tap card to see the definition

Configure a WMI filter on the GPO that specifies Windows 8 as the OS. Link the GPO to the domain.

Tap again to see the term

1/20

Created by

Bannieboy

Tags related to this set

IT Essentials: PC Hardware And Software

Marketing

Right Click

Inheritance

Terms in this set (20)

You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are applied from his or her roaming profile to any computer he or she signs in to. You think it's important for users to have this choice, but you'd like a consistent look for computers used for product demonstrations to customers. What's the best way to do this without affecting users when they sign in to other computers?

Configure loopback policy processing in Computer Configuration. Configure the desktop settings in User Configuration and link the GPO to the OU containing the demonstration computers.

You want to create policies in a new GPO that affect only computers with Windows 8 installed. You don't want to reorganize your computer accounts to do this, and you want computers that are upgraded to Windows 10 to fall out of the GPO's scope automatically. What can you do?

Configure a WMI filter on the GPO that specifies Windows 8 as the OS. Link the GPO to the domain.

You have just finished configuring a GPO that modifies several settings on computers in the Operations OU and linked the GPO to the OU. You right-click the Operations OU and click Group Policy Update. You check on a few computers in the Operations department and find that the policies haven't been applied. On one computer, you run gpupdate and find that the policies are applied correctly. What's a likely reason the policies weren't applied to all computers when you tried to update them remotely?

You need to configure the firewall on the computers.

No computers in an OU seem to be getting computer policies from the GPO linked to the OU, but users in the OU are getting user policies from this GPO. Which of the following are possible reasons that computer policies in the GPO aren't affecting the computers? (Choose all that apply.)

-The Computer Configuration settings are disabled.

-The computer accounts have Deny Read permission.

An administrator would like to configure a computer to load policy information that is stored locally to speed system start-up. What client-side feature should the administrator select?

Group Policy caching

A junior administrator deleted a GPO accidentally, but you had backed it up. What should you do to restore the deleted GPO?

Right-click the Group Policy Objects folder and click Manage Backups.

You want to create an HTML report that shows which policies and GPOs are applied to a particular user and computer. Which command should you use?

gpresult

Users who log on from a branch office connected to the DC via a slow WAN link are complaining of slow logon times when you assign applications via group policies. What can you do to speed their logons?

Configure asynchronous processing when a slow link is detected

express in Qbasic assignment statement
[tex]v = \ \sqrt{t} ^{2} - 4s \div {d}^{4} [/tex]

[tex]K = {8}{x} ^{3} - {2}{y}^{ 6} \div {5}{d}+ {e}^{4} [/tex]

Answers

Answer:

v = sqr(t^(1/2)) - 4 * s / d^4

K = 8 * x^3 - 2 * y^6 / 5 * d + e^4

Explanation:

Given

[tex]v = \ \sqrt{t} ^{2} - 4s \div {d}^{4}[/tex]

[tex]K = {8}{x}^{3} - {2}{y}^{ 6} \div {5}{d}+ {e}^{4}[/tex]

Required

The equivalent in Q Basic

To solve this, we use the following rules:

+ , - and * are written as + , - and *

[tex]\div[/tex] is written as /

^ stands for raise to power

SQR is used for square

^(1/2) stands for square root.

So, the equivalents of the above statements are:

v = SQR(t^(1/2)) - 4 * s / d^4

K = 8 * x^3 - 2 * y^6 / 5 * d + e^4

Other Questions
Which of the following is anexample of facilitateddiffusion?A. liquid molecules colliding with oneanotherB. reaching an equal amount of molecules onboth side of a membraneC. red blood cells allowing glucose to move inand outD. cytoplasm keeping an organelle in place determine the cause and effect in this passage and then enter your answer into the space provided. be as detailed as possible in your response. the monkey paw by w.w. Jacob All of the following statements about ferns are correct except:_________A) ferns flourish in many habitats, but the majority are located in the tropics.B) the sporophyte is a conspicuous generation. C) sori are located on the back or ventral surface of fronds.D) the gametophyte is a conspicuous generation.E) ferns have underground stems called rhizomes. Solve the inequality (help pls) If AC = 4x-60 and BD = 30-x, find BD (GIVING BRAINLIEST)The figure given is a rectangle Change into indirect speechSheila said to Shivam, I do not know you email.Dorje said to krishna, I am preparing milk coffe for youPratik said to prizma, my mother has asked for your helpThey young lady said phurba, I have been living in kathmandu for five yearsRadha said to krishna, I missed you a lotRohan said, mother I was practicing maths. What are three disadvantages and three advantages of outsourcing? Is outsourcing good or bad? Why is it good? Why is it bad? Which part of a cell directs the cell's activities and holds its DNA? A. Mitochondrion B. Ribosome C. NucleusD. Cell membrane How does the author create and maintain tension during the scene at the cornucopia The hunger games Find the length of BC.. what is the integer for 5 feet above seawater?Please answer my question D: How can beta particles be dangerous to living cells?A. They move fast and penetrate the skin.B. They are very high in energy and can travel through mostmaterials.C. They move slowly but are very large.D. They are very low in energy but remain in the body for a long time. CAN YALL HELP ME PLSSS NOW I NEED IT PLS IM BEGGING ITS FOR PYTHAGOREAN THEOREM Picture with the question is posted What did passage of the Immigration Act of 1965 accomplish? Thinking about Manifest Destiny, the Texas Revolution, and The Mexican American War, do you think the choice to expand sparked a civil war or do you think westward expansion had nothing to do with the civil war? A veterinarian asked each of her 18 patrons if they have a dog. She also asked each patron if they have acat. The Venn diagram below shows the data she collected.Complete the following two-way frequency table Im sorry if its difficult to readwe dont talk about how I messed up my first question and jad to make another one because im slow The population of a city has increased by 27% since it was last measured. If the current population is 38,100, what was the previous population? =___ What evidence is there that the use of fossil fuels, which produce carbon dioxide, is causing climate change?