Week 8
Reminders / Notes
- Fall Break is Thursday and Friday of this week. There is no lab on those
days, but students were encouraged to attend an earlier lab, so expect extra
students.
TOPICS
- Questions and Answers.
- Expect questions on mutator functions, value returning methods,
constructors, javadoc, and accessor methods.
Exercise
Assignment 4 is posted. This is a large assignment, so the purpose
of todays lab is to get everyone familiar with the expectations and some of the
technicalities of the assignment.
- javadoc: The javadoc for assignment 4 is here.
Go through the javadoc step by step, referring back to the skeleton of
the person
class given by the assignment.
- If you still have time, or your students are having trouble with
javadoc, have them go back to their LoanBalance2 programs and comment it
such that it creates a javadoc, and actually make their own javadoc from
it.
- Work on Assignment 4 for the rest of lab.
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