next up previous
Next: Implementing the Design Up: Design - How It Previous: Design Principles Summary

Design Summary

Input/Output class
DATA (KNOWING) METHODS (DOING)
stuff associated with file that we'll write to / read from
Display Menu  
  register student
  display st. info (given st. num)
  pay fees
  change address
  add/drop course
  select section
  print admin. information
  quit
  admin information printing:
  st. names, nums
  course names, enrollment
  instructors
  input user menu choice
Prompt for:  
  student name
  student number
  student address
  student date of birth
  fees to pay
  course to take
  section selection
 
Input:  
  student name
  student number
  student address
  student date of birth
  course choice
  section choice
  if invalid course, print error message, try again
  display section information
  if invalid section, print error message, try again
  if invalid st. num., print error message, try again

Student class
DATA (KNOWING) METHODS (DOING)
  Constructor (name, st. num., dob, addr.)
 
equals method  
  parameter: int st. num. returns: boolean
  test for equality of argument and st. num.
name set/get name
st. num. set/get st. num
dob set/get dob
fees owing
pay fees  
  parameter: double amount returns: void
  subtract amount from fees owing
address get/set address
set of courses
add course  
  (parameter: Course ref., returns: void)
  put ref. in set of courses
number of courses  
set of sections
add section  
  (parameter: Section ref., returns: void)
  put ref. in set of sections
  incr. num courses

StudentList class
DATA (KNOWING) METHODS (DOING)
set of students enrolled in university
create new student:  
  call Student constructor
  put reference in list
  increment number of students
number of students enrolled in university
find student:  
  parameter: integer student numbe. returns: Student object
  Loop over set of students
  call boolean method in Student: true if right st. number
  if st. num. found, return ref. to Student
  if st. num not found, return null
 
get Student object:  
  parameter: int. returns: ref. to Student object
  returns corresponding ref. from set of refs.
  get number of students

Section class
DATA (KNOWING) METHODS (DOING)
set of students in section get Available spots: cap. - num students
number of students in section get lecture times
capacity of section get lecture room
instructor name for section
add student  
  (parameter: Student ref., returns: void)
  put ref. in array
  incr. num students
lecture room  
lecture times  

CourseList class
DATA (KNOWING) METHODS (DOING)
set of courses offered by university
Does course exist?  
  (parameter: String coursename. returns: Course ref.)
  Loop over course references
  call method in course (parameter: String coursename. returns: boolean)
  if exists, return ref. immediately
  if doesn't exist for all courses, return null
number of courses offered by university  

Course class
DATA (KNOWING) METHODS (DOING)
course name
Does course exist?  
  (parameter: String. returns: boolean
  perhaps define as equals method
  should compare argument to name of object
set of sections for this course
get available spots in section  
  (parameter: integer (section number), returns: integer)
  call available spots method for appropriate section
number of sections for this course
get lecture times in section  
  (parameter: integer (section number), returns: String)
  call get lect. times method for appropriate section
 
get lecture room for section  
  (parameter: integer (section number), returns: String)
  call get lect. room method for appropriate section
 
get Section ref.  
  (parameter: integer, returns: Section ref.)
  return ref. to section

 


next up previous
Next: Implementing the Design Up: Design - How It Previous: Design Principles Summary
Chris Trendall
Copyright ©Chris Trendall, 2001. All rights reserved.

2001-12-09