Skip to content

Solutions to end of chapter exercises in Java How to Program 11th edition

Notifications You must be signed in to change notification settings

mfouquier/Java-How-to-Program-11e

Repository files navigation

Java-How-to-Program-11e

Solutions to end of chapter exercises in Java How to Program 11th edition

These projects are a collection of the assignments from two Java courses using the book Java How to Program 11th Edition

  • Chapter 2

    • Arithmetic -> take two user input integers and returns the sum, product, difference, and quotient.
    • Comparing Integers -> take two user input integers and compares to determine which is larger or if they are equal.
    • Circle -> takes user input radius of a circle and returns diameter, circumference, and area.
  • Chapter 3

    • Date -> takes three integers and checks for they conform to month day year constraints and prints in the format MM/DD/YYYY.
    • Print Triangles -> prints various triangle shapes using *
    • Parking Charges -> calculates parking charges based on number of hours parked. First 3 hours free and a max charge are considered.
  • Chapter 4

    • Credit Limit -> simulates a credit card with a credit limit and calculates debits and credits and prints balance.
    • Tabular Output -> creates a table of exponents using a while loop.
    • Triangle -> request 3 user inputs and determines whether the input make a valid triangle.
    • Bar Chart -> creates a simple bar chart using * based on user input.
  • Chapter 5

    • Factorial -> prints out the factorial of a variable.
    • Pythagorean Triple -> prints out the Pythagorean triple.
    • Smallest Integer -> take user input of 5 integers and returns the smallest input integer.
    • Value of Pi -> endlessly prints the value of Pi -> will have to check the point of this exercise to determine if program runs as expected.
  • Chapter 6

    • Exponents -> takes user input for integer and exponent and returns the result -> 5^2 returns 25
    • Hypotenuse -> takes user input for 2 sides of a triangle and returns the hypotenuse.
    • Sets -> prints out a random even, odd, or 4's from randomly generated set of values.
    • Square Asterisks -> takes user integer input and then creates a square/rectangle based on that number using *
  • Chapter 7

    • Dice Rolling -> simulates rolling two die 36,000,000 times and prints the frequency each value 2 - 12 was returned.
    • Fibonnaci -> takes user input and return the fibonacci sequence.
    • Liquids -> either uses a fixed or random array based on user response of user defined size. Generates the number of ounces then converts that to quarts. Then converts to gallons.
    • Two by Three -> performs various functions on a 2x3 array.
    • Sales Commisions -> calculates salary + commission calculations.
    • Exer 7 14 -> takes user input with a Ctrl-Z break then calculates the product of all integers submitted.
    • Exer 7 11 -> exercise to fill arrays with all 0's and fill with a given integer, etc.
  • Chapter 8

    • Employee -> creates an Employee class to store names, salaries, and calculate salary raises.
    • Huge Integer -> takes user input and performs comparisons to a stored integer value.
    • Patterns -> takes user input and creates various patterns using *
  • Chapter 9

    • Date -> prints dates in various formats -> U.S., European, etc. then compares two dates
    • Line of Code -> practice extending classes and using super
    • Quadrilateral -> extends multiple classes and calculates area of various shapes by extending and using super.
  • Chapter 10

    • Shapes -> similar to Quadrilateral but breaks shapes into 2d and 3d then extends from there.
  • Chapter 11

    • Exceptions -> tests using exceptions to handle errors.
  • Chapter 16

    • Time -> uses a Comparator and a Priority Queue to compare two Time objects
  • Chapter 18

    • Recursive Power -> caluclates the power of an integer using recursion.
  • Chapter 19

    • Bubble Sort -> exercise to demonstarte bubble sort.
  • Chapter 20

    • Pair -> uses Generics and sorting
  • Chapter 21

    • Concatenate Lists -> uses LinkedList objects and concatenates them.
    • Reverse Sentance -> takes a user inputed line of text, prints the line split into its elements and then prints it in reverse. Uses Generics, stack, and pop.
    • Sorted List -> sorts a randomly generated list of integers.
    • Tree Depth -> uses the Tree class from the text and determines the depth of a tree of random values.
  • Chapter 23

    • Bouncing Ball - creates a frame and generates random size and color circles when a mouse is clicked that move and bounce around the frame.
  • Chapter 26

    • Calculator -> creates a calculator gui with no functionality.
    • Coordinates -> compares array of coordinates and sorts them from low to high
  • Chapter 27

    • Client Server Connect -> simulates a client server connection. Validates client username and password and presence of a file. Username and password in text file.
    • Grid Five -> creates a 5x5 grid in JFrame.
  • JavaFX

    • BMI Calculator -> creates a JavaFX gui that calculates BMI.
    • Tip Calculator -> creates a JavaFX gui that calculates a tip based on total.

About

Solutions to end of chapter exercises in Java How to Program 11th edition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages