T4 - OO Analysis And Design Flashcards
Explain what is the noun approach
Identifying candidate noun based on Relevant or fuzzy (possibly relevant) nouns
Deduction irrelevant nouns
Further analysis
Identify the final classes
Explain the common phrase approach
Building based on commonality between objects
Concept, event, organisation, people, places
Physical class, business class, logical class, application class, behavioural class
Explain the CRC approach
Classes Name Responsibilities: Identifying class operations Collaborators: Identify other classes that it needs to operate
Explain what is Recursive Association
This class can reproduce more of the same class
Explain what defines a super class
All Subclass have similar concepts Represents common attributes operation in each sub class Represent common associations of sub classes
Explain what defines a sub class
Inherit all subclass attribute and operation and more
Concept of Sub class 100% rule/ member: Must be 100% related to the super class Kind of superclass rule: Payment is super and credit, check and cash are types of payments
Coding differences/ defining a subclass
• Additional attributes
• Additional association
Handled differently and can behave differently
Discuss the different visibility
\+ (Public): Anyone can access - (Private): only the class can access # (Protected): Only operates within the class and children classes ~ (Package): everything in the package can access the variable
Explain what defines low coupling
coupling is the degree of interdependence between software modules
Low dependency, this class does not effect that many other classes
Example of high coupling
Generalisation and aggregation (Class diagrams)
Low coupling
Dependency relationships
Explain what defines high cohesion
High cohesion means to keep similar and related things together, to couple or fuse parts which share content, functionality, reason or goal.
Describe the role of parameters and return values in exchanging messages or
operations.
Parameters (or arguments) are the types of data that an object requires to perform a
certain task
Parameters are predefined by the method
Once the method accepts the parameter the method processes the data and return a message
What is an enumeration?
An enum type is a special data type and are set of predefined constants.
Explain what is an association class
association class is association relationship between two other classes
it is described by additional attributes which does not belong to the objects involved in the association
the common attribute does not fit in either class. Instead it should be a association class