Big Java Early Objects Easy Exercises

Chapter 2

  • 371t3 hack3rs
  • Average word length
  • Rectangle construction
  • Translate square so that intersection has area 10
  • Red checkerboard squares
  • Traffic light
  • Make stronger password
  • Reversing a string with StringBuilder
  • Uppercase international letters
  • Draw intersection of rectangles
  • Rectangle with 3D effect
  • Drawing with fill3DRect
  • Chapter 3

  • BankAccount with Service Charge
  • BankAccount with Transaction Count
  • BankAccount with Bonus for Opening Account
  • ClassSchedule
  • ClassSchedule with setDays and set times
  • ClassSchedule with getDays and set times
  • XML Map Labels
  • XML Map Labels convert to decimal degrees
  • Chapter 4

  • Normalizing Angles
  • Last n Characters
  • Length of Line
  • Initials
  • Timer
  • Decimal Degrees
  • Degree, Minute, Second
  • Distance between two points on earth
  • Swap first and last name
  • Change Firstname Lastname to Lastname, Firstname
  • Chapter 5

  • Employee Pay with Overtime
  • Middle Letter
  • Check for Valid Answers
  • Overlapping sets
  • Intersecting Lines
  • Sort Names
  • Number guessing game
  • All the same
  • All different
  • All the same sign
  • Chapter 6

  • GetVowels
  • EvenSum
  • Stutter
  • Count perfect squares
  • Count Sevens
  • Format Phone Number
  • Color codes for double-sized image
  • Run-Length Encoding
  • Picture of Colored Boxes
  • Balloon Filled Sky
  • Chapter 7

  • List of numbers
  • Short words
  • Select a short word
  • Diagonals on board
  • Border on board
  • Run lengths
  • Same beginning and end sequence
  • Remove short words
  • Number of even and odd elements
  • Letter frequency (count)
  • Letter frequency (percentage)
  • Swap first and second half of array
  • Swap adjacent elements in array
  • Railfence cypher
  • Chapter 8

  • Reimplement Person class to increase cohesion
  • Swap values by using an array
  • Preconditions for Sentence constructor
  • Static method for computing number of binary digits in n
  • Static field to count number of objects
  • Reimplement Vehicle class to increase cohesion
  • Introduce class to implement method that mutates value
  • Preconditions for SalaryBonus constructor
  • Static method for counting the number of times a character appears in a string
  • Static field to maintain the total value of Coin objects created
  • Chapter 9

  • Make Sentence implement Measurable
  • Make a measurer for words
  • Implement the Doublable interface
  • Provide a RectangleDoubler class that implements the Doubler interface
  • Clicking the button moves the rectangle
  • Implement an Interface to Change Rectangle Dimensions
  • Implement an Interface to Provide Museum's Car Count
  • Using Anonymous Objects
  • Creating the Movement Interface
  • Using instanceof for Converting Between Animal Types
  • Chapter 10

  • Extend ASCII art rectangle to filled rectangle
  • Extend ASCII art rectangle to tiled rectangle
  • Implement LabeledPoint.toString
  • Implement LabeledPoint.equals
  • Implement Tile.translate
  • Auto extending Vehicle and overriding getID
  • Inherit and call a superclass constructor
  • An enum type describing chemical elements
  • Using an Abstract Class
  • Overriding the equals Method
  • Chapter 11

  • Reversing the lines in a file
  • Find longest word in file
  • Throw IllegalArgumentException in SavingsAccount constructor
  • Catching a NumberFormatException
  • Add throws clause to web reader
  • Processing exam scores
  • Processing names
  • Converting temperatures
  • Throw IllegalArgumentException in Vehicle constructor
  • Design IllegalNumberOfWheels Exception
  • Chapter 12

  • Using inheritance for modeling Square class
  • Using aggregation for modeling Square class
  • Use Money interface in invoice program
  • Add transfer to ATM
  • Add user interface for balance transfer
  • Collaborator classes
  • Using Aggegation
  • Relationships between classes and interfaces
  • Chapter 13

  • Pyramid volume
  • Zipper words
  • Zipper words with helper method
  • ZipperWordGenerator
  • A recursive squid (square in diamond)
  • Reverse an integer
  • Reverse an integer with helper method
  • Multiplication as recursive addition
  • Recursive toString for array
  • Reverse toString for array
  • Extract uppercase letters from string
  • Recursive string reversal with helper method
  • Find vowels in string with recursive helper method
  • Chapter 14

  • Modified SelectionSort
  • Count visits in selection sort
  • Count visits in selection sort
  • Sort real data
  • Number guesser
  • Selection sort modification placing only min and max
  • Selection sort modification placing even before odd
  • Merge sort modification placing even before odd
  • Descending merge sort
  • Selection sort modification, placing the largest element first
  • Chapter 15

  • Remove short words
  • Duplicate short words
  • Concatenate elements backwards
  • Rotate linked list by manipulating nodes
  • Using a stack for checking balanced parentheses
  • Remove all but first two elements from linked list
  • Add an element to the front and back of a linked list
  • Add an element after the first and before the last
  • Implement addLast using raw nodes
  • Palindrome testing with stack and queue
  • Chapter 16

  • Letter set
  • Letter frequency map
  • Path lengths in binary tree
  • Hash code for LabeledPoint
  • A fast priority queue
  • Unique words in two string sets
  • Map words to their lengths
  • Map word lengths to words
  • Hash code for Person class
  • Make Person class comparable
  • Chapter 17

  • Generic matrix class as array of arrays
  • Generic matrix class as linear array
  • Generic matrix class as a map with integer keys
  • Generic matrix class as a map with integer pair keys
  • Pair class with compareTo method
  • Generic pair with min method
  • Generic method for filling an array
  • Generic replicate method
  • Finding the first match for a predicate
  • Finding all matches for a predicate
  • Chapter 18

  • Lay out login frame
  • Layout of navigation buttons
  • Customize greeting with check boxes
  • Customize greeting with radio buttons
  • Customize greeting with combo box
  • Sliders adjust the width and height of a rectangle
  • Lay out a menu
  • Add listeners to menu
  • Base 6 calculator layout
  • Combo box with functions
  • Chapter 19

  • SuperCaesar Cipher
  • HyperCaesar cipher
  • Swap As and Os in RandomAccessFile
  • Swap adjacent characters in a RandomAccessFile
  • Reading a serialized array of objects
  • Chapter 20

  • Liftoff threads
  • Synchronizing multiple summation threads
  • Using conditions for completion count
  • Launching multiple summation threads and using yield
  • A slow sorting algorithm with two threads
  • Chapter 21

  • Oracle client
  • Oracle server
  • Cookies with raw sockets
  • Cookies with URLConnection
  • Popular boys and girls names
  • Chapter 22

  • Get cities with population > 10 million
  • Get cities with population in a given range
  • Count cities in a given country
  • Get countries with large capital cities
  • Update city populations
  • Chapter 23

  • Read XML from string or file.
  • How many items in this RSS file?
  • Get a title from an RSS file
  • Get the version attribute from an RSS file
  • Get the version attribute from an RSS file