Can you write it in Java, add comments    Create an application containing an array that stores eight integers. Prompt the user to enter the 8 integers. The application should call five methods that in turn (1) display all the integers, (2) display all the integers in reverse order, (3) display the sum of the integers, (4) display all values less than the calculated average value, and (5) display all values that are higher than the calculated average value. Save the file as ArrayMethodDemo

Question

Can you write it in Java, add comments 

 

Create an application containing an array that stores eight integers. Prompt the user to enter the 8 integers. The application should call five methods that in turn (1) display all the integers, (2) display all the integers in reverse order, (3) display the sum of the integers, (4) display all values less than the calculated average value, and (5) display all values that are higher than the calculated average value. Save the file as ArrayMethodDemo

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Java

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Provided below is the C implementation of the quick sort sorting algorithm. Modify it, so that low, ...

A: #include <stdio.h>#define N 10/* Function prototypes */void quicksort(int* low, int* high);int...

Q: Write a python program to multiply the elements of two arrays in reverse order and then sum them up....

A: a = [2, 1, 8, 9]b = [4, 2, 7, 12]c = b[::-1] # reverse of array bmul = [] #Empty array for saving mu...

Q: 6. How would you connect to a database by using .NET?

A: Click to see the answer

Q: this java program computes the sale of flowers. Name of flowers: daisy, pansy, rose, violet, carnati...

A: subtract the coupon value from total, if the total is greater than the coupon; display total; otherw...

Q: Java Program Please Write a program that will print a histogram of stars indicating the number of st...

A: Declare array to store number of students who scored from 90 to 100 Based on the value, print the as...

Q: Write a recursive function to compute first N fibonacci numbers.Test and trace for N=6.Program muste...

A: #include <iostream>using namespace std;int recurive_fibo(int n){if(n==0 || n==1)return 1;elser...

Q: #4

A: Actually, array is a collection of elements.

Q: Please help with the following question: Write pseudocode for a program that allows the user to inpu...

A: Explanation Program to allow user to input two numbers and code c. if code c has value 1 then print ...

Q: 1. Why is it important that the development team must identify a suitable life cycle model? 1. A lif...

A: Actually,  (SDLC) is a Software Development Life Cycle .

Q: int main(){Book * book1 = new Book("Learning Python","David Ascher");Book * book2 = new Book("C++ Pr...

A:   class IndexItem {public:virtual int count() = 0;virtual void display()= 0;}; class Book : public I...

Q: #include<stdio.h>#include<string.h>struct info{char names[100];int age;float wage;};int ...

A: C programming is a general-purpose, procedural, imperative computer programming language developed i...

Q: how can I describe the basic construction of a digital logic chip? Is digital logic chip same with l...

A: Note: According to the guidelines, we can answer only one question at a time. Please re-submit your ...

Q: Could you help me on this? Please use pointer notation instead of array

A: Actually, array is a collection of elements

Q: write a program in C language to count composite numbers from m and n (including m and n also) using...

A: #include<stdio.h> ...

Q: Problem: Recursive Power Method Design a python function that uses recursion to raise a number to a ...

A: # Function to calcuate the power of a number recursively def RecPower(num,power):   if power ==0:   ...

Q: how can i install cockpit and log in into the Web Console and  also create three accounts  1)  Cecil...

A: The cockpit will install with its required dependencies by the following command.           # yum i...

Q: For given weighted Graph, find the MS@ysing Prim and Kruskal algorithms. You must show the intermedi...

A: Start from a node and keep tract of two sets of vertices which are included in MST and which are not...

Q: Write the JAVA methods for the following. Rotate a Line Rotate a Rectangle Rotate a Triangle Rotate...

A: Rotate a Line import acm.program.*;import acm.graphics.*;import java.lang.Math; public class rotatin...

Q: Count and sum the same? yes or, no, why? 1. { int sum = 0; for ( int count = 0; count < 10; count...

A: Answer in step2

Q: subject (data structures ) Write a pseudocode for bubble sort using two stacks, show how to solve i...

A: A pseudocode for bubble sort using two stacks is  : Push all elements of array in 1st stack Run a l...

Q: 5- Assume: (CS) = 1075 H, (IP) = 0300 H, (SI) = 0100H , (DS:100H)= 00H, (DS:101H) = 10H To what addr...

A: Actually, CS is code segment DS is Data Segment IP is Instruction Pointer SI is Source Index DI is ...

Q: Could someone rewrite this C++ code into C that would really help me along! #include using namespa...

A: Hi Student, this doesn't look like a complete code. I am not sure. so I have converted whatever you ...

Q: Focus on classes, objects, methods and good programming style. Program has to be written in basic py...

A: self is used to refer current instance random module contains randrange function used to generate ra...

Q: we studied arrays as an important data structure in Java. Discuss a situation and give an example fo...

A: Array is a collection of homogenous datatypes If there are 10 boxes containing different number of c...

Q: How to use printf to repeat a string in java?

A: printf itself can not repeat the strings in java. one needs to use loops to repeat the printing proc...

Q: What is your role in conquering security concerns as a developer? What might that involve? Where doe...

A: Solution : (1st part) Conquering security as a developer involves five major roles : Managing vulne...

Q: Computer Science Question

A: In SQL, to sort the query output "order by" clause is used. In SQL, by default sorting on a characte...

Q: See attached photo for prompt: a) Write a Python function called func_xy that takes values x and y a...

A: def func_xy(x,y):    if (x>=0 and y>=0):        return x+y    if (x>=0 and y<0):        ...

Q: Can someone please convert this C++ code into C #include using namespace std; int main() { int da...

A: Looks like your code is incomplete. but in case if this is the only code. I have solved it in step 2...

Q: a- Consider the following program written in C syntax:void swap(int a, int b) {int temp;temp = a;a =...

A: Actually, function is a set of statements.

Q: 1. What are the advantages of adhering to a life cycle model? 2. What do you consider when adapting ...

A: 1. Enables fast development and testing Issues are detected and fixed quickly Accommodates changes ...

Q: Computer Science Question

A: In SQL, to calculates the number of days between two dates, DATEDIFF() function is used. It retrieve...

Q: USING C#

A: Program: using System;class Program {  static void Main() {      double amount, interestPerc, intere...

Q: Explain the difference in the C memory model between global and local variables. How is each allocat...

A: Introduction of a global and local variable in language C: If we declare any variable inside the fun...

Q: Could someone rewrite this C++ code into C that would really help me along!   #include <iostream&...

A: #include <stdio.h> int main(){    int day; int month; int year;    printf("enter year : ");   ...

Q: Write the command that will mount a filesystem of type ext4. The device file used for the filesystem...

A: Explanation: To mount a filesystem of type ext4, one need to create mount point and file system. Th...

Q: What is SqlCommand Object?

A:   A SqlCommand object allows the user to specify what type of interaction a user wants to perform wi...

Q: Given a matrix A of size NxN composed by floating point numbers, write an effective C function for p...

A: #include <stdio.h> int n; //Size of matrix void power(int m[n][n], int pow) //Power function{ ...

Q: Using the descriptions of the attributes given in the figure, convert the ERD shown in Figuregiven b...

A: Convert the given Entity Relationship Diagram (ERD) into dependencies diagrams: Initial dependency d...

Q: Please finish fast but accurate.Thank you!

A: Actually, control signals are used to control the data,