Write a java program that reads a list of 25 values

Assignment Help Computer Engineering
Reference no: EM132201075

Write a JAVA program that reads a list of 25 values from the user. Put the values in an array.

The program should read the array and then calculate and display the average of the even input values and the average of the odd input values.

Consideration: You should have a class and a tester. In the class, you will have three instance variable,

1) an array to hold the numbers,

2) a double to hold the odd average and a double to hold the even average.

The constructor should accept as input the array from the tester class and assign it to the instant variable; it should also assign 0 to the even and odd average variables.

You should then have a method that will read the array and then calculate the average of the even input values and the average of the odd input values.

Your program will need a getOddAverage and a getEvenAverage method. The tester class will ask the user to input numbers (consider partially filled as well).

It will then create an object passing the filled array to the class. The tester should then call the calculate the averages method. You will then need to print the even and odd average.

Reference no: EM132201075

Questions Cloud

Suppose that the distribution of ages of cars : Suppose that the distribution of ages of cars is approximately normal with a standard deviation of 3. Find the % of cars that are between 5 and 8 years old
Write a program to output the digits 0-9 to the command line : Write a Java program to read a string (a password) from the user at the command line and then check that the password conforms to the corporate password policy.
How about compared to the federal minimum wage : Jerry works at Jamba Juice and gets paid California state minimum wage. However, in the 1970s, the minimum wage was $1.60 per hour.
Dependent and independent variables : Can it be done for categorical data? Using scholarly citations, differentiate regression analysis for quantitative vs. categorical data.
Write a java program that reads a list of 25 values : The program should read the array and then calculate and display the average of the even input values and the average of the odd input values.
Hat is the probability that you would pick an edge piece : Assuming the first piece you picked is not replaced, what is the probability that you would pick an edge piece?
What themes and topics stood out to you : Briefly, what is the main plot? (1-2 sentences). (No need to tell me the whole story; I've seen it.) What themes and topics stood out to you?
Chances of getting the ring around a bottle : If there are 12 bottles of sprite, 10 bottles of coke, and 8 bottles of rootbeer; what are the chances of getting the ring around a bottle of coke
Difference between the standard deviation of a hypothesis : What is the Difference between the standard deviation of a hypothesis test that uses critical value and a hypothesis test that uses p values?

Reviews

Write a Review

Computer Engineering Questions & Answers

  How many such strings have exactly five as

How many such strings have exactly five a's? How many such strings have three of each letter?

  At what points you think their data is at the highest risk

Discuss, in 500 words, how you would advise your current employer to use encryption to reduce the vulnerabilities of their data at rest, in use.

  List source and destination ethernet addresseson the message

List the source and destination Ethernet addresseson the message. What value is in the Ethernet type field in thismessage? Why?

  Demonstrate the functionality of all elements of assignment

Demonstrate the functionality of all elements of this assignment. As you go, take instructional notes and screen shots that will help to reproduce your process.

  Create a program that will allow people to choose fast pass

You are a programmer at Disney World. You need to create a program that will allow people to choose fast passes for 3 different attractions.

  Draw a block diagram describing the system design

Their movements are fed into a computer that finds the differences between their joint positions and provides proportional vibrational strength feed back to the student. Draw a block diagram describing the system design.

  Create a power point presentation about inclusion

Create a Power Point Presentation about inclusion. The audience for this presentation is teachers. The presentation could be used for a teacher in-service to help alleviate teacher concerns about including students with disabilities in the classro..

  Why turning off computer by using power switch might harmful

Explain why turning off the computer by using the power switch might be harmful to the system. Four medical assistants work at their own computer workstations, which are networked to a server. Explain the function of the server.

  What are the legal consequences of each

Is it ethical for a potential employer to use the Internet this way? Is it legal? What if an angry ex-boyfriend or ex-girlfriend posted some things.

  What is your topology rationale in terms of the wan network

What is your topology rationale in terms of the wan network? Explain how in the headquarters network configurations you can employ IPSEC and WPA2 protocols.

  What is minimum sdk meaning in program

Can "Wear Minimum SDK" API version be smaller than that of "Phone and Tablet Minimum SDK" ?

  Make a visual rendering depicting your design via the use

as the lead software engineer for a medium-sized hospital you have been asked to spearhead an effort to improve the

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