
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
7th Edition
ISBN: 9780134802213
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 7, Problem 11PC
Array Operations
Write a
- 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.
Expert Solution & Answer

Want to see the full answer?
Check out a sample textbook solution
Students have asked these similar questions
Tech Distributors is implementing biometric authentication at all entry points to increase security at their scientific laboratories. Discuss the challenges of using biometric authentication.
Trendy Distributors experienced a system downtime that resulted in customers failing to make online payments or create new accounts. The disruption resulted in substantial revenue losses. Implementing continuity of operation (COOP) and business continuity (BC) strategies will ensure the organisation remains functional during and after such a disruption. Distinguish between COOP and BC, giving relevant examples.
Trendy Distributors experienced a system downtime that resulted in customers failing to make online payments or create new accounts. The disruption resulted in substantial revenue losses. Implementing continuity of operation (COOP) and business continuity (BC) strategies will ensure the organisation remains functional during and after such a disruption. Distinguish between COOP and BC, giving relevant examples.
Chapter 7 Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Ch. 7.1 - Write statements that create the following arrays:...Ch. 7.1 - Whats wrong with the following array declarations?...Ch. 7.1 - Prob. 7.3CPCh. 7.1 - Prob. 7.4CPCh. 7.1 - Prob. 7.5CPCh. 7.1 - Prob. 7.6CPCh. 7.1 - Prob. 7.7CPCh. 7.1 - Prob. 7.8CPCh. 7.2 - Prob. 7.9CPCh. 7.2 - Prob. 7.10CP
Ch. 7.2 - A program has the following declaration: double[]...Ch. 7.2 - Look at the following statements: int[] a = { 1,...Ch. 7.3 - Prob. 7.13CPCh. 7.3 - Write a method named zero, which accepts an int...Ch. 7.6 - Prob. 7.15CPCh. 7.7 - Recall that we discussed a Rectangle class in...Ch. 7.10 - Prob. 7.17CPCh. 7.11 - What value in an array does the selection sort...Ch. 7.11 - How many times will the selection sort swap the...Ch. 7.11 - Prob. 7.20CPCh. 7.11 - Prob. 7.21CPCh. 7.11 - If a sequential search is performed on an array,...Ch. 7.13 - What import statement must you include in your...Ch. 7.13 - Write a statement that creates an ArrayList object...Ch. 7.13 - Write a statement that creates an ArrayList object...Ch. 7.13 - Prob. 7.26CPCh. 7.13 - Prob. 7.27CPCh. 7.13 - Prob. 7.28CPCh. 7.13 - Prob. 7.29CPCh. 7.13 - Prob. 7.30CPCh. 7.13 - Prob. 7.31CPCh. 7 - In an array declaration, this indicates the number...Ch. 7 - Each element of an array is accessed by a number...Ch. 7 - The first subscript in an array is always. a. 1 b....Ch. 7 - The last subscript in an array is always. a. 100...Ch. 7 - Array bounds checking happens. a. when the program...Ch. 7 - This array field holds the number of elements that...Ch. 7 - Prob. 7MCCh. 7 - This search algorithm repeatedly divides the...Ch. 7 - Prob. 9MCCh. 7 - When initializing a two-dimensional array, you...Ch. 7 - Prob. 11MCCh. 7 - To delete an item from an ArrayList object, you...Ch. 7 - To determine the number of items stored in an...Ch. 7 - True or False: java does not allow a statement to...Ch. 7 - True or False: An arrays sitze declarator can be a...Ch. 7 - Prob. 16TFCh. 7 - True or False: The subscript of the last element...Ch. 7 - Prob. 18TFCh. 7 - True or False: The Java compiler does not display...Ch. 7 - Prob. 20TFCh. 7 - True or False: The first size declarator in the...Ch. 7 - Prob. 22TFCh. 7 - Prob. 23TFCh. 7 - int[] collection = new int[-20];Ch. 7 - Prob. 2FTECh. 7 - Prob. 3FTECh. 7 - Prob. 4FTECh. 7 - Prob. 5FTECh. 7 - The variable names references an integer array...Ch. 7 - The variables numberArray1 and numberArray2...Ch. 7 - Prob. 3AWCh. 7 - In a program you need to store the populations of...Ch. 7 - In a program you need to store the identification...Ch. 7 - Prob. 6AWCh. 7 - Prob. 7AWCh. 7 - Prob. 8AWCh. 7 - Prob. 9AWCh. 7 - Prob. 10AWCh. 7 - Prob. 11AWCh. 7 - Prob. 1SACh. 7 - Prob. 2SACh. 7 - Prob. 3SACh. 7 - Prob. 4SACh. 7 - Prob. 5SACh. 7 - Prob. 6SACh. 7 - Prob. 7SACh. 7 - Prob. 8SACh. 7 - Prob. 9SACh. 7 - Rainfall Class Write a RainFall class that stores...Ch. 7 - Payroll Class Write a Payroll class that uses the...Ch. 7 - Charge Account Validation Create a class with a...Ch. 7 - Charge Account Modification Modify the charge...Ch. 7 - Prob. 5PCCh. 7 - Drivers License Exam The local Drivers License...Ch. 7 - Magic 8 Ball Write a program that simulates a...Ch. 7 - Grade Book A teacher has five students who have...Ch. 7 - Grade Book Modification Modify the grade book...Ch. 7 - Average Steps Taken A Personal Fitness Tracker is...Ch. 7 - Array Operations Write a program with an array...Ch. 7 - Prob. 12PCCh. 7 - Sorted List of 1994 Gas Prices Note: This...Ch. 7 - Name Search If you have downloaded this books...Ch. 7 - Population Data If you have downloaded this books...Ch. 7 - World Series Champions If you have downloaded this...Ch. 7 - 2D Array Operations Write a program that creates a...Ch. 7 - Prob. 18PCCh. 7 - Trivia Game In this programming challenge, you...Ch. 7 - Prob. 20PC
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
17–1C A high-speed aircraft is cruising in still air. How does the temperature of air at the nose of the aircra...
Thermodynamics: An Engineering Approach
Money Counting Game Create a change-counting game that gets the user to enter the number of coins required to m...
Starting Out with Python (4th Edition)
What is an object? What is a control?
Starting Out With Visual Basic (8th Edition)
Random Number Guessing Game Write a program that generates a random number and asks the user to guess what the ...
Starting Out with C++ from Control Structures to Objects (9th Edition)
Declare method sphereVolume to calculate and return the volume of the sphere. Use the following statement to ca...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Write a program that determines the change to be dispensed from a vending machine. An item in the machine can c...
Java: An Introduction to Problem Solving and Programming (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- A network administrator at Trendy Distributors identifies sensitive files being transferred from a Local Area Network (LAN) workstation to an unauthorised outside IP address in a foreign country. An investigation determines that the firewall has not been altered, and the anti-virus on the workstation is up-to-date. What could be the MOST likely explanation for this?arrow_forwardA network administrator at Trendy Distributors identifies sensitive files being transferred from a Local Area Network (LAN) workstation to an unauthorised outside IP address in a foreign country. An investigation determines that the firewall has not been altered, and the anti-virus on the workstation is up-to-date. What could be the MOST likely explanation for this?arrow_forwardThe software testers who perform an audit are given access to the Tech Distributors’ facility and network. The testers will not be given access to the details of the custom-developed software the customer uses. However, the testers will also have access to the source code for several open-source applications and networking equipment used at the facility. These items will be within the scope of the audit. Establish and describe the appropriate software testing methods for this audit.arrow_forward
- The security manager at TwoUp Technologies’ primary role is implementing cybersecurity functions and strategising how IT services should be governed to fulfil business needs. The IT and cybersecurity framework can shape company policies by providing procedures, activities, checklists, and technologies that should be implemented. Describe the four categories governing an organisation’s system or data asset to meet the CIA triad and non-repudiation properties.arrow_forwardA supply management director of Tech Distributors is sending a payment confirmation email to one of the organisation’s regional managers. The organisation experienced a security breach when the company network was attacked by one of the employees who had plugged in a virus-infected external storage device. The company experienced a data breach of confidential customer and supplier financial details. To improve communication security and prevent breaches in the future, all communications with regional offices must be encrypted. The director has sent the encrypted email message below to a regional manager. Delineate cryptography and use the ROT13 substitution cipher to decrypt the message. Cnlzrag unf orra rssrpgrqarrow_forwardA supply management director of Tech Distributors is sending a payment confirmation email to one of the organisation’s regional managers. The organisation experienced a security breach when the company network was attacked by one of the employees who had plugged in a virus-infected external storage device. The company experienced a data breach of confidential customer and supplier financial details. To improve communication security and prevent breaches in the future, all communications with regional offices must be encrypted. The director has sent the encrypted email message below to a regional manager. Delineate cryptography and use the ROT13 substitution cipher to decrypt the message. Cnlzrag unf orra rssrpgrqarrow_forward
- The security manager at TwoUp Technologies’ primary role is implementing cybersecurity functions and strategising how IT services should be governed to fulfil business needs. The IT and cybersecurity framework can shape company policies by providing procedures, activities, checklists, and technologies that should be implemented. Describe the four categories governing an organisation’s system or data asset to meet the CIA triad and non-repudiation properties.arrow_forwardTwoUp Technologies employees have been using simple, easy-to-remember passwords, opening the company software, and making the network vulnerable to attacks. The company has experienced network attacks and data breaches in the past year. To implement security control strategies, the security manager must identify security risks within the organisation. The security manager explained to management the impact of this vulnerability and recommended eliminating unsecured networks. Expound on the different local and remote methods that attackers can use to gain access to the company network. Give an example of each path.arrow_forwardModern cybersecurity threats have become sophisticated, making the ability to describe and analyse threat behaviour necessary. Describe how you would analyse cybersecurity threats in an organisation.arrow_forward
- Go through Chapter 1 of Ralph Stair's Fundamentals of Information Systems, 9th edition. Explain the benefits and drawbacks of doing a job search online in Chapter 1.arrow_forwardConsider the following information about the getTax method The method is a static method in the PurchaseManager class The method has one double parameter The method retums a double equal to its parameter times 0.08 The following code segment appears in another s PurchaseManager class double tax-ex(100.0); System.out.println(); Auto saved at 16:24:12 2 Mark for Review What if anything is printed as a result of executing the code segment O 8.0 108.0 Nothing is printed because the method call should be PurchaseManager.getTax(100.0 Nothing is printed because the retum value from getTax cannot be assigned to thearrow_forward9 Mark for Review ARC Consider the following method. public void doSomething() { } System.out.println("Something has been done"); Each of the following statements appears in a method in the same class as doSomething. Which of the following statements are valid uses of the method doSomething? I. doSomething(); II. III. B String output = doSomething(); System.out.println(doSomething()); I only I and II only I and III only I, II, and IIIarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage

C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr

Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Program to find HCF & LCM of two numbers in C | #6 Coding Bytes; Author: FACE Prep;https://www.youtube.com/watch?v=mZA3cdalYN4;License: Standard YouTube License, CC-BY