Determine and output the average

Assignment Help Basic Computer Science
Reference no: EM131386900

Write a program (ArrayDemo.java) that prompts the user to enter 5 integer numbers. Once the user enters the 5 numbers, the program must determine and output the average, the largest, and smallest of 5 numbers.

Use the Scanner class as shown in the video of the Arrays module to read user input from the terminal window.

You must define the methods listed below in your program.  Make sure to keep the keyword "static" when you define the methods (we will learn later what static means). Call these methods from the "main" to get the job done.

static float getAverage(int[] data)

 {

// put your implementation here

}

static int getLargest(int[] data)

 {

// put your implementation here

}

static int getSmallest(int[] data)

{

// put your implementation here

}

Reference no: EM131386900

Questions Cloud

Example of a proactive technology : Security technologies can be grouped into two categories: proactive and reactive. Identify a real-world example of a proactive technology and an example of a reactive technology. Discuss how they support an organization's security posture.
Does merrill lynch qualify as a holder in due course : At that time, Eldon's asked Merrill Lynch about the whereabouts of the stock certificate and asserted a claim to its ownership. Does Merrill Lynch qualify as a holder in due course? Why?
What is the inductance of inductor #3 : The current flow in the circuit is 0.509 amp. Inductor #1 has an inductance of 1.3 henry, and inductor #2 has an inductance of 0.75 henry. What is the inductance of inductor #3? (Assume all inductors to be pure inductors.)
Describe methods used by the organization to measure actions : Describe methods used by the organization to measure and monitor sustainable actions by the firm. Analyze the internal and global challenges that management must weigh before deciding on sustainable changes.
Determine and output the average : Write a program (ArrayDemo.java) that prompts the user to enter 5 integer numbers. Once the user enters the 5 numbers, the program must determine and output the average, the largest, and smallest of 5 numbers.
Is exchange subject to consolidateds defense : Consolidated Business Forms leased a Phillips business computer from Benchmark.- Is Exchange subject to Consolidated's defense?
Discuss about the life long strategies : CS204:Lifelong professionalism and how you will maintain your image.Short-term goals (following the SMART method) and how you will develop a plan to meet them.Long-term goals (following the SMART method) and how you will develop a plan to meet them.E..
What are the benefits of being a member of the wto : Dispute settlement is the focus of the World Trade Organization (WTO) and the way that the organization keeps the global economy stable. What is the WTO, and what is its history? What are the benefits of being a member of the WTO?
What will be the banks cause of action : If Peter and Howard disappear, may the bank recover from Donna notwithstanding her defense of failure of consideration? What will be the bank's cause of action?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Base your algorithm on the traversal algorithm dfs

Base your algorithm on the traversal algorithm dfs.

  What is the difference between the types of parameters

What is the difference between the types of parameters (explained in Chapter 4) used in methods and the types of values that can be returned from a function?

  Determines whether each is even or odd

Incorporate this method into an application that inputs a sequence of integers (one at a time) and determines whether each is even or odd.

  Construct and interpret an appropriate confidence interval

Construct and interpret an appropriate confidence interval. Discuss any reservations you have about this inference.

  Finding shortest paths starting from s in g

Suppose that a directed graph G has the property that every shortest path from the starting vertex s to every other vertex has at most four edges. What would this fact imply about the running time of the Bellman-Ford algorithm for finding shortest..

  Explain how service-oriented software can be used to build

Explain how service-oriented software can be used to build distributed applications using Web services.

  Deadweight loss in a monopolized market

1) If the government sets a price ceiling below the monopoly price, will this reduce deadweight loss in a monopolized market? 2) True/False. A profit maximizing monopolist will always produce an output that is less than the output that maximizes sa..

  Organization uses to protect information

Organization uses to protect information

  Eclipse program project

Write a complete program that stores and prints participants in a party. As part of your program, write a Party class that implements these members:

  Open a new database in microsoft access

Open a new database in Microsoft Access

  Open service gateway intiative component

Explain the process of developing a service bundle using the Open Service Gateway Intiative component?

  Explain data by state of computer-s electrical switches

Differentiate between computer data represented by the state of computer's electrical switches and meaningful information which is displayed to user.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd