Self-Test Questions


Suggested Projects

  1. Average Five Numbers:   Write a program that takes 5 floating point numbers as input via the command line and computes and prints their average.

  2. Compute The Area:   Write a program that computes the area of a rectangle or square given the input height and width.

  3. Find The Greatest Value:   Write a program that takes two numbers as input and returns the larger of the two. Use the ternary conditional operator to perform the comparison.

  4. Compute Time To Travel:   Write a program that takes as input distance in miles and speed in miles/hour and computes the time it will take to travel that far. The equation required is:

    image from book



Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net