Department
of
Computer Science.
Georgia State University
CSc
2310
J. L. Bhola
Fall 2008 - Assignment #1
Due Wednesday, 10th September 2008
Note: (1) For all assignments, always use comments to explain
your
program.
(2) No copying
allowed.
If it is found that students copy from each other, all of
these programs will get 0.
(3) You must use the name given to
name your
program. Should you use a
different name,
you would lose 10% of what the program is worth.
Program #1
Write program name QuadRoot.java which calculates the two roots
for the
quadratic equation and print the results on the
screen.
X = (-b ± Sqrt(b2 – 4ac))/2a
Use the following
values 2, 6 and 2 for variables a, b and c respectively
.
Program #2
Do problem number 3 from page 81 of the text. Name the program PrintJava.java
What to turn in:
1. A 3.5 inches floppy disk (IBM compatible)
consisting of
all of the .java and the .class files. MAKE SURE THAT YOUR DISK
IS VIRUS
CLEAN.
2. A print out of each of the .java
file (source
code)
3. Make sure that your name is written clearly both
on the
print out and the disk.
4. Make sure that both the .java and .class
files are
on the root directory i.e. on the “a:\” drive.
Example:
a:\QuadRoot.java
a:\QuadRoot.class
AND
a:\ PrintJava.java
a:\ PrintJava.class
Should you use any subdirectory (whatsoever) your program would not
be
graded and you will receive a 0 (zero).