[SOLVED] CSC 220 Lab 7-Arrays, conditionals and loops in Java

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon lab7-fzwluf.zip (4.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Exercise arrays, conditionals and loops in Java.

Java programs:

Design and implement an application called Mean.java that computes and prints the mean of two lists of integers coming from the same list that has n numbers: x0, x1, …, xn-1. The first list L1 contains x0, x2, …, through xn-1 if n is odd or through xn-2 if n is even. The second list L2 contains x1, x3, …, through xn-1 if n is even or through xn-2 if n is odd. Ask the user to input n and read the value of n. Then ask the user to input n integers and save them in an array. Print out L1 and compute the mean as a floating point value for L1. Then print out L2 and compute the mean as a floating point value for L2, using the following formula:

 

  • lab7-fzwluf.zip