- Browse
- » Think Java: how to think like a computer scientist
Think Java: how to think like a computer scientist
Author
Publisher
Varies, see individual formats and editions
Publication Date
Varies, see individual formats and editions
Language
English
Available
Central - Adult Nonfiction
005.133 JAVA DOWNE
1 available
005.133 JAVA DOWNE
1 available
Central - Adult Nonfiction
005.133 JAVA DOWNE 209 2nd ed.
1 available
005.133 JAVA DOWNE 209 2nd ed.
1 available
Description
Loading Description...
More Details
Contributors
Mayfield, Chris(Computer scientist) author., aut, author
ISBN
9781492072508
9781492072478
9781491929568
9781492072454
9781492072478
9781491929568
9781492072454
Table of Contents
From the Book - First edition.
The way of the program
Variables and operators
Input and output
Void methods
Conditionals and logic
Value methods
Loops
Arrays
Strings and things
Objects
Classes
Arrays of objects
Objects of arrays
Objects of objects
Development tools
Java 2D graphics
Debugging.
From the eBook - Second edition.
1. Computer programming
What is a computer?
What is programming?
The hello world program
Compiling java programs
Displaying two messages
Formatting source code
Using escape sequences
What is computer science?
Debugging programs
Vocabulary
Exercises
2. Variables and operators
Declaring variables
Assigning variables
Memory diagrams
Printing variables
Arithmetic operators
Floating-point numbers
Rounding errors
Operators for strings
Complier error messages
Other types of errors
Vocabulary
Exercises
3. Input and output
The system class
The scanner class
Language elements
Literals and constants
Formatting output
Reading error messages
Type cast operators
Remainder operator
Putting it all together
The scanner bug
Vocabulary
Exercises
4. Methods and testing
Defining new methods
Flow of execution
Parameters and arguments
Multiple parameters
Stack diagrams
Math methods
Composition
Return values
Incremental development
Vocabulary
Exercises
5. Conditionals and logic
Relational operators
The if-else statement
Chaining and nesting
The switch statement
Logical operators
De Morgan's laws
Boolean variables
Boolean methods
Validating input
Example program
Vocabulary
Exercises
6. Loops and strings
The while statement
Increment and decrement
The for statement
Nested loops
Characters
Which loop to use
String iteration
The indexOf method
Substrings
String comparison
String formatting
Vocabulary
Exercises
7. Arrays and references
Creating arrays
Accessing elements
Displaying arrays
Copying arrays
Traversing arrays
Generating random numbers
Building a histogram
The enhanced for loop
Counting characters
Vocabulary
Exercises
8. Recursive methods
Recursive void methods
Recursive stack diagrams
Value-returning methods
The leap of faith
Counting up recursively
Binary number system
Recursive binary method
CodingBat problems
Vocabulary
Exercises
9. Immutable objects
Primitives versus objects
The null keyword
Strings are immutable
Wrapper classes
Command-line arguments
Argument validation
BigInteger arithmetic
Incremental design
More generalization
Vocabulary
Exercises
10. Mutable objects
Point objects
Objects as parameters
Objects as return values
Rectangles are mutable
Aliasing revisited
Java library source
Class diagrams
Scope revisited
Garbage collection
Mutable versus immutable
StringBuilder objects
Vocabulary
Exercises
11.Designing classes
The time class
Constructors
Value constructors
Getters and setters
Displaying objects
The toString method
The equals method
Adding times
Vocabulary
Exercises
12. Arrays of objects
Card objects
Card toString
Class variables
The compareTo method
Cards are immutable
Arrays of cards
Sequential search
Binary search
Tracing the code
Vocabulary
Exercises
13. Objects of arrays
Decks of cards
Shuffling decks
Selection sort
Merge sort
Subdecks
Merging decks
Adding recursion
Static context
Piles of cards
Playing war
Vocabulary
Exercises
14. Extending classes
CardCollection
Inheritance
Dealing cards
The player class
The eights class
Class relationships
Vocabulary
Exercises
15. Arrays of arrays
Conway's game of life
The cell class
Two-dimensional arrays
The gridCanvas class
Other grid methods
Starting the game
The simulation loop
Exception handling
Counting neighbors
Updating the grid
Vocabulary
Exercises
16. Reusing classes
Langton's ant
Refactoring
Abstract classes
UML diagram
Vocabulary
Exercises
17. Advanced topics
Polygon objects
Adding color
Regular polygons
More constructors
An initial drawing
Blinking polygons
Interfaces
Event listeners
Timers
Vocabulary
Exercises
A. Tools
B. Javadoc
C. Graphics
D. Debugging.
Excerpt
Loading Excerpt...
Author Notes
Loading Author Notes...
Reviews from GoodReads
Loading GoodReads Reviews.
Staff View
Loading Staff View.