Think Java how to think like a computer scientist

"Think Java is a hands-on introduction to computer science and programming used by many universities and high schools around the world. Its conciseness, emphasis on vocabulary, and informal tone make it particularly appealing for readers with little or no experience. The book starts with the mo...

Descripción completa

Detalles Bibliográficos
Otros Autores: Downey, Allen, author (author), Mayfield, Chris, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Sebastopol, CA : O'Reilly Media 2019.
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009631528706719
Tabla de Contenidos:
  • 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.