[ Up ] [ Assignment-01a ] [ Assignment-01b ] [ Assignment-01c ] [ Assignment-01d ] [ Assignment-02 ] [ Assignment-02a ] [ Assignment-03 ] [ Assignment-03a ] [ Assignment-03b ] [ Assignment-03c ] [ Assignment-03d ] [ Assignment-04 ] [ Assignment-04a ] [ Assignment-04b ] [ Assignment-05 ] [ Assignment-06 ] [ Assignment-07 ]
Writing a Java application
There are two types of Java programs: applications and applets. An applet is a
web-based Java program embedded in an HTML document. An application, on the other
hand, is not web-based. It is developed and run at the command line, much like a C
program.
Your first Java programming assignment is to write a small application. Before starting
this assignment, you should become familiar with the Java
programming environment on osprey7.
Note: There is no Java compiler on stallion. There are, however, integrated
development environments (IDEs) installed on the workstations in the PC lab, which we'll
have more to say about later.
- Write a Java application that inputs a series of ten single-digit integers as
characters, and then prints the two largest values entered. Note: Each number may be input
only once.
- This is exercise 2.17 on page 115 of the textbook Java How
to Program.
- The code should be neatly written, easy to read, and well documented. Programs that are
difficult to read or understand will lose points!
- Submit your assignment by copying the Java source code to your Web document directory on
osprey7 and putting a link to this source code on your homework page.
- Extra Credit: Modify the program so that it accepts an arbitrary number
of single-digit integers by terminating the input when the user presses return in reponse
to the input prompt.