Unit 5 - Structural Modelling Flashcards
What does the conceptual model aim to show?
It presents a view of the static structure of the problem domain.
If you start by looking for the objects in the problem domain, then when you move to a software model for that domain you are more likely to design a system whose components remain useful as the problem domain evolves.
What is the main difference between the conceptual and the analysis models?
The former represents entities from the domain and the latter entities from the software solution. Both are class models describing the objects and the relationships between them.
In domain structure models, what are the four categories of objects to search for?
. tangible objects – the physical things in the domain, such as rooms, bills, books and vehicles
.roles – the roles played by people in the domain, such as employees, guests and members of some organisation
. business transactions – the activities, episodes and interactions, such as room reservations, vehicle registrations, orders, deliveries and transactions
. organisational units – the groups to which people belong, such as accounts departments, production teams and maintenance crews.
When reading through a problem description, what makes an excellent starting point for candidate concepts for a conceptual model?
A list of nouns
How do you filter out which nouns will remain as candidate concepts?
. The same concept is often given different names and you should identify those that are redundant.
For example, the terms ‘account’, ‘posting code’
and ‘ledger’ might all turn out to have the same meaning.
. The same name might be used for different concepts so you should rename them appropriately. Often a single noun has several distinct meanings in different parts of an organisation. In different contexts, ‘policy’ might mean a piece of paper, a legal agreement or a person’s insurance cover.
. Many names are not important or independent enough to be considered as concepts on their own. Some of these may be used as properties of other
identified concepts or as a concept that connects two other concepts.
. Exclude names that refer to concepts that are not relevant to the situation being considered. They are outside the scope of the problem that you are
trying to understand. This sounds obvious, but it can often be difficult to tell. A list of candidate concepts for a petrol station system is likely to include ‘customer’. At a later stage in modelling, it might become apparent
that the system need not record information about the customers as individuals. The system is concerned with the fact that petrol was pumped and money was received.
Why do object modellers concentrate on nouns?
The nouns represent the things in the domain being modelled, and things are more stable than actions, which are expressed as verbs.
What are the main criteria for filtering a list of nouns in order to remove inappropriate ones and settle upon a suitable set of candidate
concepts?
There are basic filtering criteria that can be applied as follows:
◦ different concepts that are expressed using the same name
◦ redundancy, the same concept, given different names
◦ not important or independent enough, such as an attribute of another concept rather than a concept in its own right
◦ lack of relevance to the problem domain, being either beyond the scope of the desired system.
How is an object model visually represented?
Through an object diagram
How is an class model visually represented?
Through a class diagram
Explain why object diagrams cannot form the basis for a software specification
Object diagrams represent particular states of the system at particular moments in time, whereas a specification must describe all valid states of
the system at all possible times.
In a windowing system, a window may be converted to an icon and back to a full window. What operations can be performed on full windows but not on iconised windows? Would a model containing the classes Icon and FullWindow be able to capture the distinction
adequately?
Scrolling and maximising can be done on full windows but not on iconised ones. It would be difficult to model the distinction between a full window and its iconised version adequately by using two different classes, since an object (in this case the window) cannot dynamically change its class. One solution would be to have a single class with an attribute that distinguishes between a window being iconised or fully open.
In connection with rooms, the hotel manager’s vocabulary includes the words ‘occupied’ and ‘free’. How might such words be represented in a class diagram?
Two ways come immediately to mind:
◦ as an attribute of the Room class
◦ as an association between the Room and Guest classes.
Either is acceptable as a way of recording the information.
In your model in part (b), will your decision about occupancy change if you have to include the fact that a room must be cleaned before the next guest occupies it?
No. The cleaning of a room depends upon whether or not it is occupied, but not on how you choose to model occupancy.
You would include this requirement relating to cleaning in a dynamic model, such as a sequence diagram or state diagram.
What characterises the state of an object at a particular point in time?
The state of an object is characterised by the value of each of its attributes at that point in time.
What does an attribute of a class represent?
An attribute represents a particular property (a named value) of the class that each instance of that class will have. At any one time they collectively define the state of an instance of the class.
Does a multiplicity of 1 indicate that there can be no change in the object to which the multiplicity relates?
No. It merely means that at any one time there will be exactly one object at that end of the relationship. The attributes, or even the identity, of this object may change over time.
If an airline system models flights and pilots, and each flight needs two pilots, would you use a multiplicity of 2?
Probably not. There are probably times during the life of a Flight object when fewer than two pilots are allocated, such as when the flight has been scheduled but crew details have not yet been settled.