UML Questions used by a software company :

Q. What does "object-oriented" mean to you?
Q. Can you name the four phases of the Unified Process?
A. Inception
Elaboration
Construction
Transition
Q. What can you tell us about the different phases of the Unified Process?
Q. Talk about some OO/UML artifacts you have used. What did they mean to you? How did you apply them to yout project?
Q. What is a "use case"?
A. A complete end-to-end business process that satisfies the needs of a user.
Q. What are different categories of use cases?
A. Detail Level: - High level / Expanded
Task Level: - Super / Sub (Abstract; Equal Alternatives; Complete v. Partial)
Importance: - Primary / Secondary (use Secondary for exceptional processes)
Abstraction: - Essential / Real
Q. What is the difference between a real and essential use case?
A. essential - describes the "essence" of the problem; technology independent
real - good for GUI designing; shows problem as related to technology decisions
Q. What is polymorphism?
A. Different objects reacting to the same message differently.
Q. In a System Sequence Diagram, what is a System Event?
A. It is from the expanded use case. It is an actor action the system directly responds to.
Q. Give an example of a situation which a State Diagram could effectively model.
A. Think of a cake and its different stages through the baking process: dough, baked, burned.
Q. For what are Operations Contracts written?
A. System Events.
Q. In an Operations Contract's postconditions, four types of activities are specified. What are they?
A. They are:
instances created
associations formed
associations broken
attributes changed
Q. What does an Operations Contract do?
A. Provides a snapshot of the System's state before and after a System Event. It is not interested in the Event's specific behavior.
Q. What does a Collaboration Diagram (or Sequence Event, depending on the process) model?
A. A System Event's behavior.
Q. How does one model a class in a Collaboration Diagram? An instance?
A. A box will represent both; however, a class is written as MyClass whereas an instance is written as myInstance:MyClass.
Q. What are the three parts of a class in a Class Diagram?
A. Name, Attributes, Methods.
Q. In Analysis, we are interested in documenting concepts within the relevant problem domain. What is a concept?
A. A person, place, thing, or idea that relates to the problem domain. They are candidates for objects.
Q. Does a concept HAVE to become a class in Design?
A. No.
Q. In a Class Diagram, what does a line with an arrow from one class to another denote?
A. Attribute visibility.
Q. What are the four types of visibility between objects?
A. Local, parameter, attribute, global.
Q. Have you ever used any Design Patterns?
Q. When do you use inheritance as opposed to aggregation?
A. An aggregation is a "has a" relationship, and it is represented in the UML by a clear diamond. An example of an aggregate relation is Table of Contents and Chapter. A Table of Contents "has a" Chapter.
Q. When would I prefer to use composition rather than aggregation?
A. Composition is a stronger form of aggregation. The object which is "contained" in another object is expected to live and die with the object which "contains" it. Composition is represented in the UML by a darkened diamond. An example of a composite relation is a Book and Chapter. A Book "has a" Chapter, and the Chapter cannot exist without the Book.
Q. Is the UML a process, method, or notation?
A. It is a notation. A process is Objectory, Booch, OMT, or the Unified Process. A process and a notation together make an OO method.
Q. What are two uses for inheritance?
A. specialization - "IS A KIND OF" relationship
abstraction - pull a common concept out to a higher level to make it more generic
Q. When would you use an abstract base class
A. When you need to enforce a particular interface, but are not able or do not need to define behavior at the base class level.
Q. All containers are pretty well templatized now. Can you think of any current "example" (e.g., an algorithm) which is implemented via inheritance but might be more efficiently implemented using templates?
Q. Can you tell us some good principles to use in OOA&D?
A. NOTE: This is not a complete list, by any means, but we have listed the GRASP Patterns here for examples (these help assign responsibilities between objects):
Low coupling
High cohesion
Controller
Creator
Don't Talk to Strangers
Pure Fabrication
Indirection
Polymorphism
Expert
Q. What are some practicle benefits we can gain from a well-designed OO system?

0 comments: