BONquestions - 2009 November 23 BON Example Test Questions...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
2009 November 23 BON Example Test Questions 1. For each of the following requirements, identify candidate classes (with appropriate names) and define their relationships using BON. Associations and aggregations must be labeled. If no operations are specified, then do not provide any class interface details and use the short ellipse notation for classes. If operations are specified, then give appropriate interfaces and class invariants but do not give any contracts. Briefly explain each diagram in English. 1 . A father or a mother may have a son or daughter. A son or daughter may have a brother or a sister. 2 . A vehicle may be rented on a certain date. The rental will be at a specific rate and will be for a specific driver. Insurance is optional. 3 . A conference session may be a tutorial session, paper session or demo session. Each session involves one or more presentations. Paper presentations are reviewed, while tutorial presentations are not. 4 . A person can be a teacher or a student. A teacher can teach many courses. A student can enroll in many courses. A teacher can mentor students but a student only has one mentor. State in which class(es) you would insert a class invariant that a teacher may not be a student in a class that they teach. Give, as mathematically as possible the class invariant(s). 5. A folder in a personal computer can contain folders, text files, binary files, and pictures. Folders, files and pictures can be opened and closed. Folders, files and pictures can be inserted and removed from a folder. 6. A system is made up of clusters, classes and relationships. Clusters may contain other classes and clusters. Relationships have a source and a target, and connect clusters or classes. A relationship is either of type association, inheritance or aggregation. The latter two relationships cannot connect a class or cluster to itself. 7. The Acme widget company depends upon its employees, including its owner, its contract employees and its full time employees. All employees have a unique employee id. 8. Instructors at a university can be either tenure stream or part-time. Courses can have one or more sections. Courses with more than one section must have tenure stream instructors teaching one or more sections. Exactly one of the tenure stream instructors in a multi-section course is a course director. The instructor of a single section course is also the course director. Tenure stream instructors teach at most 3 courses. Part time instructors teach at most 6 courses. Give a static BON diagram modeling these ideas. Include appropriate class invariants.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2012 for the course CSE 3214 taught by Professor Ross during the Winter '12 term at York University.

Page1 / 5

BONquestions - 2009 November 23 BON Example Test Questions...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online