View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sp2000 Midterm Review: Analyze Student/Classroom Code

Review at Midterm Review - Sp2000.

Michael Emard and Michelle Burnett bring you the following answer:

(a) There is a collection of students in a classroom. We say this becuase classroom c adds two students.

(b) Classrooms contain a name and an ordered collection of students. Classrooms provide services such as obtaining the name, setting the name and adding and removing students.

Students each have a name section and nubmer. It should provide services to get and set these variables.


A "collection" is a programming term. What can you say about the RELATIONSHIP between the students and the classroom? Mark Guzdial


(a) The classroom HasA student. Because a student is added to the classroom, it makes sense for the clasroom to have a HasA relationship with the student.


I don't think so. The classroom doesn't use the students for anything. It seems to me that the classroom and the students have a TalksTo relationship. Just because a class has a colleciton of students doesn't mean that the relationship is HasA, does it?
Susi


(a) classroom "hasA" student. Students arent restricted to one specific classroom though. This would make more sense if student had classes (ie 2390), because a student signs up for a class. the class does not choose the student.
(b) classroom
attrib-
has a number of students
services-
add: aNode
student
attrib-
name, section, number
services-
accessor/modifier to the attributes

Harper Maddox

Link to this Page