7.11. (Part 2) Array Operations - Java

Published: 17 September 2018
on channel: Kakra Detome
3,328
27

Starting out with Java: From control structures through objects
Chapter 7
Programming Challenges

11. Array operations

Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program should also have the following methods:

• getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array.
• getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array.
• getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array.
• getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array.

Demonstrate each of the methods in the program.

Gaddis, Tony. Starting Out with Java: From Control Structures through Objects (Page 491). Pearson Education. Kindle Edition.

Thanks 😊


On this page of the site you can watch the video online 7.11. (Part 2) Array Operations - Java with a duration of hours minute second in good quality, which was uploaded by the user Kakra Detome 17 September 2018, share the link with friends and acquaintances, this video has already been watched 3,328 times on youtube and it was liked by 27 viewers. Enjoy your viewing!