ClickMe2.java, ClickMe2.html .
CheckAmount.java, CheckAmount.class .
CheckAmount program that inputs a numeric check
amount and outputs the word equivalent of the amount. For example,
the amount 112.43 should be written as
ONE HUNDRED TWELVE and 43/100To simplify the case, you can assume that any check amount will be strictly less than 1000. The CATCH is that your program must handle all possible EXCEPTIONS and other errors that might arise because of bad input.
java.io.BufferedReader class
and java.lang.System.out.print() method, similar to
Example 5. For GUI version one
can use customizable graphical dialogs provided by
javax.swing.JOptionPane class, please see
Example 6 for an illustration
of this class.
Address.java, AddressBook.java .
Address that represents a person's mailing
address. It should have separate fields for the name, street address,
city, state and ZIP code. Please think about what methods of
java.lang.Object class should your Address
class override. Include implementation for the overridden methods in
your class. Create a simple driver class AddressBook
which will allow one to store an unlimited number of mailing addresses
(instances of Address class). At a minimum your
AddressBook should allow user to enter new address, to
search for a particular person's address, and to delete a specified
address. Please do not forget about proper exception handling.
Anagram.java .
String and
StringBuffer from the java.lang package,
see
Java 2 API specification.)
JOptionPane.showInputDialog()
(our D&D textbook uses this extensively right from the start,
so there are plenty of sample code).
Another way to read two strings from the user (in case you do not want
to use Graphical Input Dialogs yet and prefer text-mode console input),
is to use BufferedReader class. Please take a look at
example Palindrome.java
on the class web page to see how BufferedReader
can be used to read strings interactively (this is
Example #5).
ColorSwitch.java .
ColorSwitch which allows
user to specify desired mix of Red, Green, and Blue. The application
should then display the resulting color. (In case of erroneous input
the application should display an error message in a separate dialog
box). I would suggest to use the following classes:
javax.swing.JFrame for the main window;
javax.swing.JPanel for managing content of the main
window;
javax.swing.JTextField for input of RGB values;
javax.swing.JButton for confirmation of input;
java.awt.Color for generating specified color;
javax.swing.JLabel for display of resulting color;
javax.swing.JOptionPane for error messages;
RaceDemo.java, RaceDemo.html,
racedemo.jar .
RaceDemo.java)
into a single java archive file racedemo.jar.
Arrange so that when a browser runs your applet, it loads the necessary
classes from this jar file.
In addition to creating an applet, please make your
RaceDemo capable of running as a standalone application
(outside of a browser). In other wirds, it should be possible to run
it simply by typing "java LastDemo".
/*
Your name
Your Student ID
Your e-mail address
I certify that the following represents my own independent work and
conforms with the guidelines of academic honesty described in the
course syllabus.
*/
Any homework submitted without this header will not be graded,
and you will receive zero credit for it.