Write method print that takes an integer array

Assignment Help Basic Computer Science
Reference no: EM131891729

1. Write method print that takes an integer array as an input parameter and prints all the numbers in the array separated by commas. Name your program ArrayTest.java.

2. Write method average that takes an integer array as an input parameter and returns the average of all numbers in the array. Define this method in ArrayTest.java as well.

3. Write method max that takes an integer array as an input parameter and returns the maximum number in the array. Define this method in ArrayTest.java also.

4. Write a main method. Define several arrays, print the content of the array, the average of the array, and the maximum number in the array. Below is my main method:

int[] nums = {14, 1, 23};

System.out.println("My first array is: ");

print(nums);

System.out.println("The average of the array is: " + average(nums));

System.out.println("The maximum number in the array is: " + max(nums));

System.out.println("");

int[] nums2 = {11, 26, 4, 2};

System.out.println("My second array is: ");

print(nums2);

System.out.println("The average of the array is: " + average(nums2));

System.out.println("The maximum number in the array is: " + max(nums2));

5. Create zip file that contains your Java programs. Include a screenshot of each program execution. You can either paste the screenshot into a Word document or simply paste it into the Comments field when submitting your homework. A sample screenshot of running my programs is attached below:

Reference no: EM131891729

Questions Cloud

Describe an organizational change : Describe an organizational change that you've witnessed or experienced. Evaluate management's 'change implementation process'.
Evaluate hard drive symptoms : A frantic user called a help desk to report that his hard drive did not appear to be working. He explained that the drive produced
List and explain two techniques or methodologies used : List and explain two techniques or methodologies used to make sure data stays confidential. (exp: Cryptography, Permissions...etc)
Explain components of a strategic information system plan : Describe the major types and classifications of health care information standards and the specific organizations that develop and regulate these standards.
Write method print that takes an integer array : Write method print that takes an integer array as an input parameter and prints all the numbers in the array separated by commas.
Change if the yield to maturity on comparable-risk bond : How does the value change if the yield to maturity on a? comparable-risk bond? (i) increases to 16 percent or? (ii) decreases to 6 percent?
What creates fragments : Why does IP need fragmentation? Who / What creates Fragments? Who / What reassembles them?
Learned stand alone : Do programming languages build on each other sequentially or can they be learned stand alone?
How do you think it would change your life : Knowing this, would you want to have an iRemember implanted? Why or why not? How do you think it would change your life, and the way society works

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Does is have more states than the mealy version

Does is have more states than the Mealy version? Use the implication chart method to reduce the number of states. Do you end with more, less, or the same number of states? Why?

  Analyze the fundamental impact of it architecture

Analyze the fundamental impact of IT architecture or enterprise architecture on information management for your chosen company or industry. Determine if IT architecture impacts the effectiveness or efficiency of information management and vice ver..

  Write a program using a beginner c language

Write a program using a beginner C language which calculates the value of ? from the series ?=(4/1)-(4/3)+(4/5)-(4/7)+(4/9)-(4/11)+... Print a table that shows the value of ?

  Software development models or methodologies

Choose one of the software development models or methodologies. References should be in APA Format.

  What is schottky diode

What is Schottky diode? Why is it also called Hot-Carrier diode? How does it differ in construction from a normal P-N junction diode?

  Recommend a fault tolerance method

Managers want to be able to print schedules on any printer at any restaurant even if traveling and in a motel with a laptop. Please explain what you would have to do to allow managers to do this and how they would reference the printer

  Principle of least common mechanism

Given that the Internet is a shared network, discuss whether preventing denial of service attacks is inherently possible or not possible. Do systems connected to the Internet violate the principle of least common mechanism?

  Reevaluating the jury system

High-profile legal cases have many people reevaluating the jury system. Many believe that juries in criminal trials should be able to convict

  What do you think outcome will be in these two situation

Regarding conflict at work, give me a scenario where you think a manager should intervene. Give me a scenario where you think a manager should not intervene. What do you think the outcome will be in these two situations?

  Draw a block diagram for your design

Design a TDM PCM system that will accommodate four 300-bit/s (synchronous) digital inputs and one analog input that has a bandwidth of 500 Hz. Assume that the analog samples will be encoded into 4-bit PCM words

  Advantages of flash memory over hard disk storage

What are the advantages of flash memory over hard disk storage? Compare and contrast the advantages of hard disk storage and flash memory. What are the advantages of both over RAM?

  How communication plays a role in academic

Discuss how communication plays a role in academic, professional, personal, and civic aspects of your life.

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