10 Exercises

  1. How many methods or fragments of methods for OOA/D have been published?
    a) 12 c) 17 e) 44
    b) between 13 and 25 d) between 26 and 44 f) over 44
  2. Which of the following OOA/D methods is associated with Jim Rumbaugh?
    a) CRC c) Ptech e) OMT
    b) HOOD d) Objectory
  3. Define 'object' (one sentence). Name the four components of an object.
  4. What is the difference between types, classes, instances and rôles?
  5. What is a 'facet'? Give three completely different examples.
  6. Why is analysis more important for OO systems?
  7. Define (a) analysis, (b) logical design and (c) physical design. What is the difference between (a) analysis and logical design and (b) logical design and physical design?
  8. Name 10 OO methods or notations.
  9. Name the four principal structures of an object model.
  10. Redraw the inheritance structure of Figure 16 with due attention to different discriminators.
  11. What is the difference between a wrapper and a subsystem or package in most OOA methods?
  12. Write invariants that might apply for all the cycles in Figure 19.
  13. Name three things that rulesets can be used for.
  14. Name six types of things that could be reused.
  15. Define: (a) pre-condition; (b) post-condition; (c) assertion; (d) invariance condition; (e) class invariant; (f) guarantee; (g) rely clause.
  16. Compare three OO methods known to you.
  17. How do you decide whether something is to be modelled as an attribute or a class?
  18. Bi-directional associations violate encapsulation. Why? How can this problem be easily overcome? Is this true in analysis as well as design? If not, why not?
  19. Discuss the use of normalization in object-oriented and conventional modelling.
  20. Discuss the use of functional decomposition in object-oriented and conventional modelling.
  21. Write a small ruleset to describe the behaviour of a technical analyst (chartist) dealing in a single security.
  22. When should state models be used and what for?
  23. Give an example of a question that might elicit an abstract class from two more concrete classes. Give an example of a question that might elicit more concrete classes from a list of objects. Give an example of a question that might elicit a yet unmentioned concept.
  24. Give some simple guidelines for textual analysis.
  25. 'A type's existence is independent of the existence of its instances.' Discuss, with reference to Plato.
  26. Why is analysis important for OO programmers?
  27. Does God throw exceptions?
  28. Using the approach described in this tutorial specify either:
    a) a simple public library lending administration system, where books can be borrowed, reserved and returned; or
    b) a simple drawing tool, where shapes can be drawn, moved, deleted and grouped.
  29. Compare two architectural styles from the following list: layers, blackboard, pipes and filters, CORBA, peer-to-peer, client-server.
  30. Define what you understand by software architecture. Why is architecture not merely high level structure?
  31. Define the terms: pattern, design pattern, analysis pattern, organizational pattern architectural pattern. Give examples of each.
  32. Distinguish between a patterns catalogue and a pattern language, giving examples.
  33. Write a pattern in Alexandrian form showing how to decouple the various shapes that could be drawn in a drawing editor from the core editor. In doing this, consider the problems of how to 'smooth' and 'unsmooth' polygons and increase or decrease the number of their vertices in a sensible way.
  34. Write patterns to deal with the following situations:
    a) the need to inform all users of e-mail of a change to their e-mail addresses, when some may be on holiday;
    b) users in a workshops continually disagree with each other;
    c) management resist object technology because they consider it too risky.
  35. Discuss the pros and cons of inheritance versus delegation.
  36. Discuss the differences between Catalysis and another OO method known to you with respect to component-based development.
  37. What is a retrieval? Give an example.
  38. Mini project
    Produce a framework template for school timetable preparation: allocating suitable classrooms, qualified teachers, ten subjects and five one-hour time-slots per weekday. Include all invariants; e.g. Chemistry needs a classroom with sinks and there must be at least five hours of Maths and English per week. Are there any rules that are hard to express in OCL? Why is this? Apply the same framework to factory production scheduling.