Week 7
Reminders / Notes
- Remind students that if they have questions regarding the grading on exam1
they need to see Prof. Ingber this week. She will not make changes to exam grades after
this week.
TOPICS
- Questions and Answers.
- Expect questions on control structures (if, while), value returning
methods, constructors, and accessor methods.
Lab 10 pts
- Give them enough class time to work on todays lab, but do not
give
them a lot of help. Let them think this on through. It is really very simple.
Students can copy the file here:
Quadratic.java
Ask students to add a static boolean method named realRoots that returns a value
of true if a quadratic equation of the form
ax2+bx+c=0 has real roots
(this is exercise 12 on page 225
of the text). A quadratic has real roots if the descriminant (b2-4ac)
is nonnegative.
Students should create their own text file to test this.
week 7 solution