Homework 4

Due Thursday July 28, 5:30pm


Homework 4 should be turned in as a printout of your program before class/lab begins on Thursday. Your program is still expected to run in DrScheme: ProfessorJ Beginner.
Printout should contain your first and last name, as well as the text Hw 4

  1. In the registrar's office, an entry for a Student contains the students name, id number, and a list of the courses the student has taken. A course has the course number, instructor, and the grade earned. Develop the data design for a Student, a List of Courses, and a Course, and represent these in Java.
  2. An individual student, Mary, has id number 26732, and has taken course 5520 from Findler and received a 95, 2984 from Matthews received a 72, and 4829 from Gray received a 88. Represent this student using your Java classes.
  3. A student can raise their grade through extra credit. Add method(s) where needed so that when a student does raise their grade, the registrar's office will have a new representation of the student with the higher grade. The grade to raise will be specified by the course number. The amount of increase will also be given.
  4. Now add additional methods where needed so that a student can raise their grades for all courses from a given instructor.
  5. Using the student information provided in qustion 2, write down the steps taken in evaluating a call to the method defined in 3, where the course is 2984 and the resulting grade will be a 95
  6. Using the Ancestor family tree from class, provide an example of 2 people and their ancestry. In one of these, include at least three generations; in the other include at least three people with green eyes.
  7. Add methods to Ancestor and it's descendents to count how many people in a family have a given name.
  8. Modify the design of Person to store how many children each person has. Add methods to Ancestor and it's descendents to total how many children are in the family (some children will be counted more than once, this is ok).