CSColor
.
Java already comes with its own Color
class, but we
are going to create a variant of that class.CSColor
.Above is the UML diagram for the CSColor class. While it has no documentation, it has enough information for you to build stubs for the CSColor class.
CSColor.java
file as needed. Click
here for a sample of what your program should produce. REFER TO Running Your Program to see how to test each of the methods.If you have already compiled your java files in jGrasp or
DrJava, you do NOT need to compile them again. But if you want
to compile your java files from the command line, enter the
following command.
javac *.java
If you have many errors and want to limit the number of error
messages displayed, enter the following alternative command.
javac *.java 2>&1 | head
-20
Normally, to run a java program that has the main
in a file named Main.java
, you would run the
following command.
java Main
But instead of sending the program output to the screen, we
want the output to go into a file. So for this program,
execute it with the following command.
java Main > output.html
This will create a file named output.html
which
you should view in a web browser.
Updated 11/16/2014 (nlh)