Introduction to Java Programming Comprehensive Version 9th Edition Liang Test Bank
Product details:
- ISBN-10 : 9780132936521
- ISBN-13 : 978-0132936521
- Author: Y. Daniel Liang
Introduction to Java Programming, Comprehensive, 9e, features comprehensive coverage ideal for a one-, two-, or three-semester CS1 course sequence.
Daniel Liang teaches concepts of problem-solving and object-oriented programming using a fundamentals-first approach. Beginning programmers learn critical problem-solving techniques then move on to grasp the key concepts of object-oriented, GUI programming, advanced GUI and Web programming using Java.
Table contents:
- VideoNotes Locations of VideoNotes http://www.pearsonhighered.com/liang
- Chapter 1 Introduction to Computers, Programs, and Java
- Objectives
- 1.1 Introduction
- 1.2 What Is a Computer?
- 1.2.1 Central Processing Unit
- 1.2.2 Bits and Bytes
- 1.2.3 Memory
- 1.2.4 Storage Devices
- Disks
- CDs and DVDs
- USB Flash Drives
- 1.2.5 Input and Output Devices
- The Keyboard
- The Mouse
- The Monitor
- 1.2.6 Communication Devices
- 1.3 Programming Languages
- 1.3.1 Machine Language
- 1.3.2 Assembly Language
- 1.3.3 High-Level Language
- 1.4 Operating Systems
- 1.4.1 Controlling and Monitoring System Activities
- 1.4.2 Allocating and Assigning System Resources
- 1.4.3 Scheduling Operations
- 1.5 Java, the World Wide Web, and Beyond
- 1.6 The Java Language Specification, API, JDK, and IDE
- 1.7 A Simple Java Program
- Welcome to Java!
- 1.8 Creating, Compiling, and Executing a Java Program
- 1.9 Programming Style and Documentation
- 1.9.1 Appropriate Comments and Comment Styles
- 1.9.2 Proper Indentation and Spacing
- 1.9.3 Block Styles
- 1.10 Programming Errors
- 1.10.1 Syntax Errors
- 1.10.2 Runtime Errors
- 1.10.3 Logic Errors
- 1.10.4 Common Errors
- 1.11 Developing Java Programs Using NetBeans
- 1.11.1 Creating a Java Project
- 1.11.2 Creating a Java Class
- 1.11.3 Compiling and Running a Class
- 1.12 Developing Java Programs Using Eclipse
- 1.12.1 Creating a Java Project
- 1.12.2 Creating a Java Class
- 1.12.3 Compiling and Running a Class
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 2 Elementary Programming
- Objectives
- 2.1 Introduction
- 2.2 Writing a Simple Program
- 2.3 Reading Input from the Console
- 2.4 Identifiers
- 2.5 Variables
- 2.6 Assignment Statements and Assignment Expressions
- 2.7 Named Constants
- 2.8 Naming Conventions
- 2.9 Numeric Data Types and Operations
- 2.9.1 Numeric Types
- 2.9.2 Reading Numbers from the Keyboard
- 2.9.3 Numeric Operators
- 2.9.4 Exponent Operations
- 2.10 Numeric Literals
- 2.10.1 Integer Literals
- 2.10.2 Floating-Point Literals
- 2.10.3 Scientific Notation
- 2.11 Evaluating Expressions and Operator Precedence
- 2.12 Case Study: Displaying the Current Time
- 2.13 Augmented Assignment Operators
- 2.14 Increment and Decrement Operators
- 2.15 Numeric Type Conversions
- 2.16 Software Development Process
- 2.17 Case Study: Counting Monetary Units
- 2.18 Common Errors and Pitfalls
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 2.13–2.17
- Chapter 3 Selections
- Objectives
- 3.1 Introduction
- 3.2 boolean Data Type
- 3.3 if Statements
- 3.4 Two-Way if-else Statements
- 3.5 Nested if and Multi-Way if-else Statements
- 3.6 Common Errors and Pitfalls
- 3.7 Generating Random Numbers
- 3.8 Case Study: Computing Body Mass Index
- 3.9 Case Study: Computing Taxes
- 3.10 Logical Operators
- 3.11 Case Study: Determining Leap Year
- 3.12 Case Study: Lottery
- 3.13 switch Statements
- 3.14 Conditional Expressions
- 3.15 Operator Precedence and Associativity
- 3.16 Debugging
- Key Terms
- Chapter Summary
- Test Questions
- MyProgrammingLab™ Programming Exercises
- Section 3.2
- Sections 3.3–3.7
- Sections 3.8–3.16
- Comprehensive
- Chapter 4 Mathematical Functions, Characters, and Strings
- Objectives
- 4.1 Introduction
- 4.2 Common Mathematical Functions
- 4.2.1 Trigonometric Methods
- 4.2.2 Exponent Methods
- 4.2.3 The Rounding Methods
- 4.2.4 The min , max , and abs Methods
- 4.2.5 The random Method
- 4.2.6 Case Study: Computing Angles of a Triangle
- 4.3 Character Data Type and Operations
- 4.3.1 Unicode and ASCII code
- 4.3.2 Escape Sequences for Special Characters
- 4.3.3 Casting between char and Numeric Types
- 4.3.4 Comparing and Testing Characters
- 4.4 The String Type
- 4.4.1 Getting String Length
- 4.4.2 Getting Characters from a String
- 4.4.3 Concatenating Strings
- 4.4.4 Converting Strings
- 4.4.5 Reading a String from the Console
- 4.4.6 Reading a Character from the Console
- 4.4.7 Comparing Strings
- 4.4.8 Obtaining Substrings
- 4.4.9 Finding a Character or a Substring in a String
- 4.4.10 Conversion between Strings and Numbers
- 4.5 Case Studies
- 4.5.1 Case Study: Guessing Birthdays
- 4.5.2 Case Study: Converting a Hexadecimal Digit to a Decimal Value
- 4.5.3 Case Study: Revising the Lottery Program Using Strings
- 4.6 Formatting Console Output
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 5 Loops
- Objectives
- 5.1 Introduction
- 5.2 The while Loop
- 5.2.1 Case Study: Guessing Numbers
- 5.2.2 Loop Design Strategies
- 5.2.3 Case Study: Multiple Subtraction Quiz
- 5.2.4 Controlling a Loop with a Sentinel Value
- 5.2.5 Input and Output Redirections
- 5.3 The do-while Loop
- 5.4 The for Loop
- 5.5 Which Loop to Use?
- 5.6 Nested Loops
- 5.7 Minimizing Numeric Errors
- 5.8 Case Studies
- 5.8.1 Case Study: Finding the Greatest Common Divisor
- 5.8.2 Case Study: Predicting the Future Tuition
- 5.8.3 Case Study: Converting Decimals to Hexadecimals
- 5.9 Keywords break and continue
- 5.10 Case Study: Checking Palindromes
- 5.11 Case Study: Displaying Prime Numbers
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 5.2–5.7
- Sections 5.8–5.10
- Chapter 6 Methods
- Objectives
- 6.1 Introduction
- 6.2 Defining a Method
- 6.3 Calling a Method
- 6.4 void Method Example
- 6.5 Passing Arguments by Values
- 6.6 Modularizing Code
- 6.7 Case Study: Converting Hexadecimals to Decimals
- 6.8 Overloading Methods
- 6.9 The Scope of Variables
- 6.10 Case Study: Generating Random Characters
- 6.11 Method Abstraction and Stepwise Refinement
- 6.11.1 Top-Down Design
- 6.11.2 Top-Down and/or Bottom-Up Implementation
- 6.11.3 Implementation Details
- 6.11.4 Benefits of Stepwise Refinement
- 6.11.4.1 Simpler Program
- 6.11.4.2 Reusing Methods
- 6.11.4.3 Easier Developing, Debugging, and Testing
- 6.11.4.4 Better Facilitating Teamwork
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 6.2–6.9
- Programming Exercises
- Sections 6.10–6.11
- Sections 6.10–6.12
- Comprehensive
- Chapter 7 Single-Dimensional Arrays
- Objectives
- 7.1 Introduction
- 7.2 Array Basics
- 7.2.1 Declaring Array Variables
- 7.2.2 Creating Arrays
- 7.2.3 Array Size and Default Values
- 7.2.4 Accessing Array Elements
- 7.2.5 Array Initializers
- 7.2.6 Processing Arrays
- 7.2.7 Foreach Loops
- 7.3 Case Study: Analyzing Numbers
- 7.4 Case Study: Deck of Cards
- 7.5 Copying Arrays
- 7.6 Passing Arrays to Methods
- 7.7 Returning an Array from a Method
- 7.8 Case Study: Counting the Occurrences of Each Letter
- 7.9 Variable-Length Argument Lists
- 7.10 Searching Arrays
- 7.10.1 The Linear Search Approach
- 7.10.2 The Binary Search Approach
- 7.11 Sorting Arrays
- 7.12 The Arrays Class
- 7.13 Command-Line Arguments
- 7.13.1 Passing Strings to the main Method
- 7.13.2 Case Study: Calculator
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 7.2–7.5
- Sections 7.6–7.8
- Section 7.9
- Sections 7.10–7.12
- Chapter 8 Multidimensional Arrays
- Objectives
- 8.1 Introduction
- 8.2 Two-Dimensional Array Basics
- 8.2.1 Declaring Variables of Two-Dimensional Arrays and Creating Two-Dimensional Arrays
- 8.2.2 Obtaining the Lengths of Two-Dimensional Arrays
- 8.2.3 Ragged Arrays
- 8.3 Processing Two-Dimensional Arrays
- 8.4 Passing Two-Dimensional Arrays to Methods
- 8.5 Case Study: Grading a Multiple-Choice Test
- 8.6 Case Study: Finding the Closest Pair
- 8.7 Case Study: Sudoku
- 8.8 Multidimensional Arrays
- 8.8.1 Case Study: Daily Temperature and Humidity
- 8.8.2 Case Study: Guessing Birthdays
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 9 Objects and Classes
- Objectives
- 9.1 Introduction
- 9.2 Defining Classes for Objects
- 9.3 Example: Defining Classes and Creating Objects
- 9.4 Constructing Objects Using Constructors
- 9.5 Accessing Objects via Reference Variables
- 9.5.1 Reference Variables and Reference Types
- 9.5.2 Accessing an Object’s Data and Methods
- 9.5.3 Reference Data Fields and the null Value
- 9.5.4 Differences between Variables of Primitive Types and Reference Types
- 9.6 Using Classes from the Java Library
- 9.6.1 The Date Class
- 9.6.2 The Random Class
- 9.6.3 The Point2D Class
- 9.7 Static Variables, Constants, and Methods
- 9.8 Visibility Modifiers
- 9.9 Data Field Encapsulation
- 9.10 Passing Objects to Methods
- 9.11 Array of Objects
- 9.12 Immutable Objects and Classes
- 9.13 The Scope of Variables
- 9.14 The this Reference
- 9.14.1 Using this to Reference Hidden Data Fields
- 9.14.2 Using this to Invoke a Constructor
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 9.2–9.5
- Section 9.6
- Sections 9.7–9.9
- Chapter 10 Object-Oriented Thinking
- Objectives
- 10.1 Introduction
- 10.2 Class Abstraction and Encapsulation
- 10.3 Thinking in Objects
- 10.4 Class Relationships
- 10.4.1 Association
- 10.4.2 Aggregation and Composition
- 10.5 Case Study: Designing the Course Class
- 10.6 Case Study: Designing a Class for Stacks
- 10.7 Processing Primitive Data Type Values as Objects
- 10.8 Automatic Conversion between Primitive Types and Wrapper Class Types
- 10.9 The BigInteger and BigDecimal Classes
- 10.10 The String Class
- 10.10.1 Constructing a String
- 10.10.2 Immutable Strings and Interned Strings
- 10.10.3 Replacing and Splitting Strings
- 10.10.4 Matching, Replacing and Splitting by Patterns
- 10.10.5 Conversion between Strings and Arrays
- 10.10.6 Converting Characters and Numeric Values to Strings
- 10.10.7 Formatting Strings
- 10.11 The StringBuilder and StringBuffer Classes
- 10.11.1 Modifying Strings in the StringBuilder
- 10.11.2 The toString , capacity , length , setLength , and charAt Methods
- 10.11.3 Case Study: Ignoring Nonalphanumeric Characters When Checking Palindromes
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 10.2–10.3
- Sections 10.4–10.8
- Section 10.9
- Sections 10.10–10.11
- Chapter 11 Inheritance and Polymorphism
- Objectives
- 11.1 Introduction
- 11.2 Superclasses and Subclasses
- 11.3 Using the super Keyword
- 11.3.1 Calling Superclass Constructors
- 11.3.2 Constructor Chaining
- 11.3.3 Calling Superclass Methods
- 11.4 Overriding Methods
- 11.5 Overriding vs. Overloading
- 11.6 The Object Class and Its toString() Method
- 11.7 Polymorphism
- 11.8 Dynamic Binding
- 11.9 Casting Objects and the instanceof Operator
- 11.10 The Object’s equals Method
- 11.11 The ArrayList Class
- 11.12 Useful Methods for Lists
- 11.13 Case Study: A Custom Stack Class
- 11.14 The protected Data and Methods
- 11.15 Preventing Extending and Overriding
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 12 Exception Handling and Text I/O
- Objectives
- 12.1 Introduction
- 12.2 Exception-Handling Overview
- 12.3 Exception Types
- 12.4 More on Exception Handling
- 12.4.1 Declaring Exceptions
- 12.4.2 Throwing Exceptions
- 12.4.3 Catching Exceptions
- 12.4.4 Getting Information from Exceptions
- 12.4.5 Example: Declaring, Throwing, and Catching Exceptions
- 12.5 The finally Clause
- 12.6 When to Use Exceptions
- 12.7 Rethrowing Exceptions
- 12.8 Chained Exceptions
- 12.9 Defining Custom Exception Classes
- 12.10 The File Class
- 12.11 File Input and Output
- 12.11.1 Writing Data Using PrintWriter
- 12.11.2 Closing Resources Automatically Using try-with-resources
- 12.11.3 Reading Data Using Scanner
- 12.11.4 How Does Scanner Work?
- 12.11.5 Case Study: Replacing Text
- 12.12 Reading Data from the Web
- 12.13 Case Study: Web Crawler
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 12.2–12.9
- Sections 12.10–12.12
- Chapter 13 Abstract Classes and Interfaces
- Objectives
- 13.1 Introduction
- 13.2 Abstract Classes
- 13.2.1 Why Abstract Methods?
- 13.2.2 Interesting Points about Abstract Classes
- 13.3 Case Study: the Abstract Number Class
- 13.4 Case Study: Calendar and GregorianCalendar
- 13.5 Interfaces
- 13.6 The Comparable Interface
- 13.7 The Cloneable Interface
- 13.8 Interfaces vs. Abstract Classes
- 13.9 Case Study: The Rational Class
- 13.10 Class Design Guidelines
- 13.10.1 Cohesion
- 13.10.2 Consistency
- 13.10.3 Encapsulation
- 13.10.4 Clarity
- 13.10.5 Completeness
- 13.10.6 Instance vs. Static
- 13.10.7 Inheritance vs. Aggregation
- 13.10.8 Interfaces vs. Abstract Classes
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 13.2–13.3
- Sections 13.4–13.8
- Section 13.9
- Chapter 14 JavaFX Basics
- Objectives
- 14.1 Introduction
- 14.2 JavaFX vs Swing and AWT
- 14.3 The Basic Structure of a JavaFX Program
- 14.4 Panes, UI Controls, and Shapes
- 14.5 Property Binding
- 14.6 Common Properties and Methods for Nodes
- 14.7 The Color Class
- 14.8 The Font Class
- 14.9 The Image and ImageView Classes
- 14.10 Layout Panes
- 14.10.1 FlowPane
- 14.10.2 GridPane
- 14.10.3 BorderPane
- 14.10.4 HBox and VBox
- 14.11 Shapes
- 14.11.1 Text
- 14.11.2 Line
- 14.11.3 Rectangle
- 14.11.4 Circle and Ellipse
- 14.11.5 Arc
- 14.11.6 Polygon and Polyline
- 14.12 Case Study: The ClockPane Class
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 14.2–14.9
- Sections 14.10–14.11
- Section 14.12
- Chapter 15 Event-Driven Programming and Animations
- Objectives
- 15.1 Introduction
- 15.2 Events and Event Sources
- 15.3 Registering Handlers and Handling Events
- 15.4 Inner Classes
- 15.5 Anonymous Inner Class Handlers
- 15.6 Simplifying Event Handling Using Lambda Expressions
- 15.7 Case Study: Loan Calculator
- 15.8 Mouse Events
- 15.9 Key Events
- 15.10 Listeners for Observable Objects
- 15.11 Animation
- 15.11.1 PathTransition
- 15.11.2 FadeTransition
- 15.11.3 Timeline
- 15.12 Case Study: Bouncing Ball
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 15.2–15.7
- Sections 15.8 and 15.9
- Section 15.10
- Section 15.11
- Chapter 16 JavaFX UI Controls and Multimedia
- Objectives
- 16.1 Introduction
- 16.2 Labeled and Label
- 16.3 Button
- 16.4 CheckBox
- 16.5 RadioButton
- 16.6 TextField
- 16.7 TextArea
- 16.8 ComboBox
- 16.9 ListView
- 16.10 ScrollBar
- 16.11 Slider
- 16.12 Case Study: Developing a Tic-Tac-Toe Game
- 16.13 Video and Audio
- 16.14 Case Study: National Flags and Anthems
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 16.2–16.5
- Sections 16.6–16.8
- Sections 16.6–16.8
- Comprehensive
- Chapter 17 Binary I/O
- Objectives
- 17.1 Introduction
- 17.2 How Is Text I/O Handled in Java?
- 17.3 Text I/O vs. Binary I/O
- 17.4 Binary I/O Classes
- 17.4.1 FileInputStream/FileOutputStream
- 17.4.2 FilterInputStream/FilterOutputStream
- 17.4.3 DataInputStream/DataOutputStream
- 17.4.3.1 Characters and Strings in Binary I/O
- 17.4.3.2 Creating DataInputStream / DataOutputStream
- Detecting the End of a File
- 17.4.4 BufferedInputStream/BufferedOutputStream
- 17.5 Case Study: Copying Files
- 17.6 Object I/O
- 17.6.1 The Serializable Interface
- 17.6.2 Serializing Arrays
- 17.7 Random-Access Files
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Section 17.3
- Section 17.4
- Section 17.6
- Section 17.7
- Comprehensive
- Chapter 18 Recursion
- Objectives
- 18.1 Introduction
- 18.2 Case Study: Computing Factorials
- 18.3 Case Study: Computing Fibonacci Numbers
- 18.4 Problem Solving Using Recursion
- 18.5 Recursive Helper Methods
- 18.5.1 Recursive Selection Sort
- 18.5.2 Recursive Binary Search
- 18.6 Case Study: Finding the Directory Size
- 18.7 Case Study: Tower of Hanoi
- 18.8 Case Study: Fractals
- 18.9 Recursion vs. Iteration
- 18.10 Tail Recursion
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 18.2–18.3
- Section 18.4
- Section 18.5
- Sections 18.6–18.10
- Chapter 19 Generics
- Objectives
- 19.1 Introduction
- 19.2 Motivations and Benefits
- 19.3 Defining Generic Classes and Interfaces
- 19.4 Generic Methods
- 19.5 Case Study: Sorting an Array of Objects
- 19.6 Raw Types and Backward Compatibility
- 19.7 Wildcard Generic Types
- 19.8 Erasure and Restrictions on Generics
- 19.9 Case Study: Generic Matrix Class
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 20 Lists, Stacks, Queues, and Priority Queues
- Objectives
- 20.1 Introduction
- 20.2 Collections
- 20.3 Iterators
- 20.4 Lists
- 20.4.1 The Common Methods in the List Interface
- 20.4.2 The ArrayList and LinkedList Classes
- 20.5 The Comparator Interface
- 20.6 Static Methods for Lists and Collections
- 20.7 Case Study: Bouncing Balls
- 20.8 Vector and Stack Classes
- 20.9 Queues and Priority Queues
- 20.9.1 The Queue Interface
- 20.9.2 Deque and LinkedList
- 20.10 Case Study: Evaluating Expressions
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 20.2–20.7
- Sections 20.8–20.10
- Chapter 21 Sets and Maps
- Objectives
- 21.1 Introduction
- 21.2 Sets
- 21.2.1 HashSet
- 21.2.2 LinkedHashSet
- 21.2.3 TreeSet
- 21.3 Comparing the Performance of Sets and Lists
- 21.4 Case Study: Counting Keywords
- 21.5 Maps
- 21.6 Case Study: Occurrences of Words
- 21.7 Singleton and Unmodifiable Collections and Maps
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 21.2–21.4
- Sections 21.5–21.7
- Chapter 22 Developing Efficient Algorithms
- Objectives
- 22.1 Introduction
- 22.2 Measuring Algorithm Efficiency Using Big O Notation
- 22.3 Examples: Determining Big O
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
- Example 7
- 22.4 Analyzing Algorithm Time Complexity
- 22.4.1 Analyzing Binary Search
- 22.4.2 Analyzing Selection Sort
- 22.4.3 Analyzing the Tower of Hanoi Problem
- 22.4.4 Common Recurrence Relations
- 22.4.5 Comparing Common Growth Functions
- 22.5 Finding Fibonacci Numbers Using Dynamic Programming
- 22.6 Finding Greatest Common Divisors Using Euclid’s Algorithm
- 22.7 Efficient Algorithms for Finding Prime Numbers
- 22.8 Finding the Closest Pair of Points Using Divide-and-Conquer
- 22.9 Solving the Eight Queens Problem Using Backtracking
- 22.10 Computational Geometry: Finding a Convex Hull
- 22.10.1 Gift-Wrapping Algorithm
- 22.10.2 Graham’s Algorithm
- Key Terms
- Chapter Summary
- Quiz
- Chapter 23 Sorting
- Objectives
- 23.1 Introduction
- 23.2 Insertion Sort
- 23.3 Bubble Sort
- 23.4 Merge Sort
- 23.5 Quick Sort
- 23.6 Heap Sort
- 23.6.1 Storing a Heap
- 23.6.2 Adding a New Node
- 23.6.3 Removing the Root
- 23.6.4 The Heap Class
- 23.6.5 Sorting Using the Heap Class
- 23.6.6 Heap Sort Time Complexity
- 23.7 Bucket Sort and Radix Sort
- 23.8 External Sort
- 23.8.1 Implementing Phase I
- 23.8.2 Implementing Phase II
- 23.8.3 Combining Two Phases
- 23.8.4 External Sort Complexity
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 23.3–23.5
- Section 23.6
- Section 23.7
- Section 23.8
- Comprehensive
- Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues
- Objectives
- 24.1 Introduction
- 24.2 Common Features for Lists
- 24.3 Array Lists
- 24.4 Linked Lists
- 24.4.1 Nodes
- 24.4.2 The MyLinkedList Class
- 24.4.3 Implementing MyLinkedList
- 24.4.3.1 Implementing addFirst(e)
- 24.4.3.2 Implementing addLast(e)
- 24.4.3.3 Implementing add(index, e)
- 24.4.3.4 Implementing removeFirst()
- 24.4.3.5 Implementing removeLast()
- 24.4.3.6 Implementing remove(index)
- 24.4.4 MyArrayList vs. MyLinkedList
- 24.4.5 Variations of Linked Lists
- 24.5 Stacks and Queues
- 24.6 Priority Queues
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 25 Binary Search Trees
- Objectives
- 25.1 Introduction
- 25.2 Binary Search Trees
- 25.2.1 Representing Binary Search Trees
- 25.2.2 Searching for an Element
- 25.2.3 Inserting an Element into a BST
- 25.2.4 Tree Traversal
- 25.2.5 The BST Class
- 25.3 Deleting Elements from a BST
- 25.4 Tree Visualization and MVC
- 25.5 Iterators
- 25.6 Case Study: Data Compression
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 25.2–25.6
- Chapter 26 AVL Trees
- Objectives
- 26.1 Introduction
- 26.2 Rebalancing Trees
- 26.3 Designing Classes for AVL Trees
- 26.4 Overriding the insert Method
- 26.5 Implementing Rotations
- 26.6 Implementing the delete Method
- 26.7 The AVLTree Class
- 26.8 Testing the AVLTree Class
- 26.9 AVL Tree Time Complexity Analysis
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 27 Hashing
- Objectives
- 27.1 Introduction
- 27.2 What Is Hashing?
- 27.3 Hash Functions and Hash Codes
- 27.3.1 Hash Codes for Primitive Types
- 27.3.2 Hash Codes for Strings
- 27.3.3 Compressing Hash Codes
- 27.4 Handling Collisions Using Open Addressing
- 27.4.1 Linear Probing
- 27.4.2 Quadratic Probing
- 27.4.3 Double Hashing
- 27.5 Handling Collisions Using Separate Chaining
- 27.6 Load Factor and Rehashing
- 27.7 Implementing a Map Using Hashing
- 27.8 Implementing Set Using Hashing
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 28 Graphs and Applications
- Objectives
- 28.1 Introduction
- 28.2 Basic Graph Terminologies
- 28.3 Representing Graphs
- 28.3.1 Representing Vertices
- 28.3.2 Representing Edges: Edge Array
- 28.3.3 Representing Edges: Edge Objects
- 28.3.4 Representing Edges: Adjacency Matrices
- 28.3.5 Representing Edges: Adjacency Lists
- 28.4 Modeling Graphs
- 28.5 Graph Visualization
- 28.6 Graph Traversals
- 28.7 Depth-First Search (DFS)
- 28.7.1 Depth-First Search Algorithm
- 28.7.2 Implementation of Depth-First Search
- 28.7.3 Applications of the DFS
- 28.8 Case Study: The Connected Circles Problem
- 28.9 Breadth-First Search (BFS)
- 28.9.1 Breadth-First Search Algorithm
- 28.9.2 Implementation of Breadth-First Search
- 28.9.3 Applications of the BFS
- 28.10 Case Study: The Nine Tails Problem
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 28.6–28.10
- Chapter 29 Weighted Graphs and Applications
- Objectives
- 29.1 Introduction
- 29.2 Representing Weighted Graphs
- 29.2.1 Representing Weighted Edges: Edge Array
- 29.2.2 Weighted Adjacency Matrices
- 29.2.3 Adjacency Lists
- 29.3 The WeightedGraph Class
- 29.4 Minimum Spanning Trees
- 29.4.1 Minimum Spanning Tree Algorithms
- 29.4.2 Refining Prim’s MST Algorithm
- 29.4.3 Implementation of the MST Algorithm
- 29.5 Finding Shortest Paths
- 29.6 Case Study: The Weighted Nine Tails Problem
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 30 Multithreading and Parallel Programming
- Objectives
- 30.1 Introduction
- 30.2 Thread Concepts
- 30.3 Creating Tasks and Threads
- 30.4 The Thread Class
- 30.5 Case Study: Flashing Text
- 30.6 Thread Pools
- 30.7 Thread Synchronization
- 30.7.1 The synchronized Keyword
- 30.7.2 Synchronizing Statements
- 30.8 Synchronization Using Locks
- 30.9 Cooperation among Threads
- 30.10 Case Study: Producer/Consumer
- 30.11 Blocking Queues
- 30.12 Semaphores
- 30.13 Avoiding Deadlocks
- 30.14 Thread States
- 30.15 Synchronized Collections
- 30.16 Parallel Programming
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Sections 30.1–30.5
- Sections 30.8–30.12
- Section 30.15
- Section 30.18
- Comprehensive
- Chapter 31 Networking
- Objectives
- 31.1 Introduction
- 31.2 Client/Server Computing
- 31.2.1 Server Sockets
- 31.2.2 Client Sockets
- 31.2.3 Data Transmission through Sockets
- 31.2.4 A Client/Server Example
- 31.3 The InetAddress Class
- 31.4 Serving Multiple Clients
- 31.5 Sending and Receiving Objects
- 31.6 Case Study: Distributed Tic-Tac-Toe Games
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Section 31.2
- Sections 31.3 and 31.4
- Section 31.5
- Section 31.6
- Section 31.7
- Chapter 32 Java Database Programming
- Objectives
- 32.1 Introduction
- 32.2 Relational Database Systems
- 32.2.1 Relational Structures
- 32.2.2 Integrity Constraints
- 32.2.2.1 Domain Constraints
- 32.2.2.2 Primary Key Constraints
- 32.2.2.3 Foreign Key Constraints
- 32.2.2.4 Enforcing Integrity Constraints
- 32.3 SQL
- 32.3.1 Creating a User Account on MySQL
- 32.3.2 Creating a Database
- 32.3.3 Creating and Dropping Tables
- 32.3.4 Simple Insert, Update, and Delete
- 32.3.5 Simple Queries
- 32.3.6 Comparison and Boolean Operators
- 32.3.7 The like, between-and, and is null Operators
- 32.3.8 Column Alias
- 32.3.9 The Arithmetic Operators
- 32.3.10 Displaying Distinct Tuples
- 32.3.11 Displaying Sorted Tuples
- 32.3.12 Joining Tables
- 32.4 JDBC
- 32.4.1 Developing Database Applications Using JDBC
- 32.4.2 Accessing a Database from JavaFX
- 32.5 PreparedStatement
- 32.6 CallableStatement
- 32.7 Retrieving Metadata
- 32.7.1 Database Metadata
- 32.7.2 Obtaining Database Tables
- 32.7.3 Result Set Metadata
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Chapter 33 JavaServer Faces
- Objectives
- 33.1 Introduction
- 33.2 Getting Started with JSF
- 33.2.1 Creating a JSF Project
- 33.2.2 A Basic JSF Page
- 33.2.3 Managed JavaBeans for JSF
- 33.2.4 JSF Expressions
- 33.3 JSF GUI Components
- 33.4 Processing the Form
- 33.5 Case Study: Calculator
- 33.6 Session Tracking
- 33.7 Validating Input
- 33.8 Binding Database with Facelets
- 33.9 Opening New JSF Pages
- Key Terms
- Chapter Summary
- Quiz
- MyProgrammingLab™ Programming Exercises
- Appendix 1
- Appendixes
- Appendix A Java Keywords
- Appendix B The ASCII Character Set
- Appendix C Operator Precedence Chart
- Appendix D Java Modifiers
- Appendix E Special Floating-Point Values
- Appendix F Number Systems
- F.1 Introduction
- F.2 Conversions Between Binary and Decimal Numbers
- F.3 Conversions Between Hexadecimal and Decimal Numbers
- F.4 Conversions Between Binary and Hexadecimal Numbers
- Appendix G Bitwise Operations
- Appendix H Regular Expressions
- H.1 Matching Strings
- H.2 Regular Expression Syntax
- H.3 Replacing and Splitting Strings
- Appendix I Enumerated Types
- I.1 Simple Enumerated Types
- I.2 Using if or switch Statements with an Enumerated Variable
- I.3 Processing Enumerated Values Using a Foreach Loop
- I.4 Enumerated Types with Data Fields, Constructors, and Methods
- Index
People also search:
introduction to java programming comprehensive version 9th
introduction to java programming comprehensive version
intro to java programming comprehensive version 11th edition
intro to java programming comprehensive version
java programming 9th edition solutions