Georgia State University Department of Computer Science ...

pheasantarrogantSoftware and s/w Development

Aug 15, 2012 (5 years and 5 days ago)

437 views

Georgia State University

Department of Computer Science

CSc 2010


Spring 2010

Assignment # 6
: Due 4/26/
10

You are to write a program name
f
actorial.java

that will use the quadratic equation


X = (
-
b ± √(b
2



4ac)

) /
(
2a)

You must prompt the user to enter
the values for
a, b

and
c

and use these values to solve the
problem.

NOTE: This formula allows you to get 2 results.

Print out the results on the screen.

Assumptions: We will assume that the user will
NOT

enter a value of
0

for
a
. Also we will
assume that when we calculate the square root part,
b
2

will always be greater than
4ac
.
This
means that the values for
a
,
b

and
c

will be such that the above assumption will be true.

What to turn in.

1.

Turn in the program on a disk (Fl
ash or CD) with the files:



factorial.java



factorial.class




OR if you use Netbeans to write your program



Main.java



factorial.jar

2.

A print out of the
f
actorial.java

file.

Go to this web site to download the Java Net Beans
software:

http://netbeans.org/downloads/index.html


OR

Go to this web site to download only the standalone version of JDK

http://java.sun.com/javase/downloads/index.jsp