Java 6 Illuminated: An Active Learning Approach: An Active Learning Approach (Jones and Barlett Illuminated) by Anderson Julie & Franceschi Herve J
Author:Anderson, Julie & Franceschi, Herve J. [Anderson, Julie]
Language: eng
Format: mobi
Publisher: Jones & Bartlett Learning
Published: 2008-02-11T16:00:00+00:00
EXAMPLE 9.5 Processing a Column in a Two-Dimensional Array
At line 17, we declare and initialize a single-dimensional String array named familyMembers to make our prompt more user-friendly. At lines 24-28, we again use a do/while loop to prompt the user for a valid family member index.
To calculate the maximum value of the family member cell bills, we first initialize the variable memberMaxBill to the first element in the column (familyCellBills[0][currentMember]) at line 30. We then use a standard for loop at lines 31-39, following the pattern described earlier to update the value of memberMaxBill as necessary. There is one minor difference; we do not need to start the row at index 0 because we initialized memberMaxBill to the value of the element in row 0 of the column currentMember. Note that we assume that there is an element at column 0 of each row, that is, each row has been instantiated. The value of the variable memberMaxBill is then formatted and printed at lines 41-44. Figure 9.8 shows the output of the program.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12454)
Hello! Python by Anthony Briggs(9800)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9692)
The Mikado Method by Ola Ellnestam Daniel Brolund(9684)
Dependency Injection in .NET by Mark Seemann(9228)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8194)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7686)
Grails in Action by Glen Smith Peter Ledbrook(7607)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7448)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6605)
Microservices with Go by Alexander Shuiskov(6367)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6317)
Practical Design Patterns for Java Developers by Miroslav Wengner(6275)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6248)
Angular Projects - Third Edition by Aristeidis Bampakos(5599)
The Art of Crafting User Stories by The Art of Crafting User Stories(5174)
NetSuite for Consultants - Second Edition by Peter Ries(5127)
Kotlin in Action by Dmitry Jemerov(4956)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(4924)
