Sample CS 371 Midterm Examination Problems

  1. Develop a use case diagram for the following application. Pick any two use cases you define, and write use case descriptions for them.

    WebWelt is an internet-based collaborative programming environment. Each developer who logs in to WebWelt can "see" the other programmers, create projects and source code files, "travel" to other programmer's projects and view what they are doing in real time, and if given permission, can contribute to each other's efforts. The WebWelt tool supports browsing of projects and people on-line. A main display shows the current project with source code in the top window and the actual executing program (programs are 3D virtual reality environments) in the bottom window. Programmers can chat with each other, or simply move around as different colored cursors within the same text editor, making source code changes that each other can watch. WebWelt is interactive and uses a "continuous execution" paradigm in which programs are always in an editing and executing state.

  2. Suppose you are given the task of doing a preliminary software design in UML, and told that your main goal should be to identify classes that will be needed in the software system under construction. How will you identify what classes are needed? List as many ways or sources as you can.
  3. Suppose you are given the task of doing a detailed software design in UML, and told that your main goal should be to identify methods that will be needed in the software system under construction. How will you identify what methods are needed? List as many sources as you can.
  4. What does inheritance really mean, anyhow? Define briefly.
  5. What does aggregation really mean, anyhow? Define briefly.
  6. Some languages support a concept called delegation in which every instance (named, say, object1), if it is passed a message that it has no method for, will automatically forward that message on to another instance (object2). The object1 stores a reference to its object2 as one of its attribute fields. Is there a relationship or similarity between delegation and the concepts of inheritance or aggregation? If so, what is it?
  7. Develop a statechart to control the values of an attribute MaritalStatus in a class Person. Allow for the usual possibilities (single, married, divorced, separated, widowed). Define as many events, actions, conditions, activities as you can think of. Please keep your diagram "G" rated, and use correct UML notation.
  8. Develop a collaboration diagram to describe the sequence of communications between objects in a software system that manages the inventory, sales, and ordering of gasoline at a convenience store such as PicQuik. Use correct UML notation.
  9. Write a class diagram fragment with the following characteristics: there are three classes, Alien, Predator, and Hobbit. A Predator is a particular type of Alien. Predators are associated with Aliens in the sense that each Predator hunts one Alien: in that association the Predator is the hunter and the Alien is the hunted. Aliens are associated with Hobbits in that Hobbits serve as hosts for Aliens. Each Alien can have many (zero or more) Hobbit hosts. Use correct UML, and stick as close as you can to this textual description of the classes and associations.