OO Objects (PPT 9-10) Flashcards
What is a class?
Represents all objects within the problem domain that share the characteristics and behaviour of a concept, e.g. a customer
What is an object?
It is an instance of a class/concept. All instances of the object share the same attributes
What can objects do?
They can provide and perform operations. This allows them to be called upon to do specific duties. They can also collaborate and send messages between other objects
What is a class diagram?
It is a visual model of the problem domain and a potential design for the system. Allows us to capture our understanding, test and communicate our thoughts
What types of things can be classes?
- Tangible or physical things
- Types of roles played by people, places or organisations
- Incidents or events
- Transactions
- Policies, processes and/or algorithms
- Specifications
What are Specification Classes?
They are general classes usually used for inventory systems, such as products. Can distinguish between objects which provide a specification and objects which meet the specification
What are some techniques for identifying classes?
- Larmans Conceptual Class Categories
- Noun analysis
What are the class categories in Larmans?
- Physical things
- Types of people
- Places
- Catalogues, containers
- Transactions
- Product or service related to transaction
- Other systems we integrate with
- Other
What are some ways we can refine noun candidate classes?
Redundant Concepts -Two nouns refer to the same concept Irrelevant Concepts -Outside the scope of the system Vague or Too broad in scope Attributes of another class
What are the three types of class we may have?
- Entity class
- Boundary class
- Control class
What is an entity class?
It is a class which represents things which are long lived, application independent and usually real world entities
What is a boundary class?
It is a class which handles communication between the external world and the system. May also link to other systems or electro-mechanical systems
What is a control class?
It is a class which coordinates events within the system. It delegates and knows when to do things, not how
What are analysis patterns?
They are distilled experiences of recurring problems during the analysis of systems
Give an example of an analysis pattern
The quantity pattern: Is a cost a more complex concept than it seems?