Assign 04 - Classes & Objects
Assign 04 - Classes & Objects
You need to submit a single pdf document with the following contents:
data.txt
Alexander Bowman
1234
845.90
Bianca Bradley
8888
550.49
Cindy Chen
7777
1000.55
Diane Zhang
6666
854.99
Elizabeth May
5555
1234.56
These functions are useful only if the discriminant is nonnegative. Let these functions
return 0 if the discriminant is negative.
Draw the UML diagram for the class. Implement the class. Write a test program that
prompts the user to enter values for a, b, and c, and displays the result based on the
discriminant. If the discriminant is positive, display the two roots. If the discriminant is 0,
display the one root. Otherwise, display "The equation has no real roots".
Knowledge [5]
1. Program runs without any syntax error(s)
2. Program read in the input correctly
3. Program process the output correctly
4. Replit link is clickable
5. Neat and clean screenshots of source code and sample run are taken
Communication [5]
Application [5]
Thinking [5]
Note:
*Late submissions will lose marks
*In-class progress must be demonstrated to verify authenticity of work or marks may also be
deducted