Week 3. UML Class Diagram and Configuration Management
2 min read
Week 3. UML Class Diagram and Configuration Management
Class Diagrams
Class diagram (UML)
A class diagram shows the static class structure, they are used when developing an object-oriented system model to show the classes in a system and the associations between these classes.
It consists of:
Class (UML Class)
An object class (or just class) which can be thought of as a general definition of one kind of system object.
An aggregation is a special form of association used to express that a class is part of another class, properties of the aggregation association include:
transitive: if B is part of A and C is part of B, C is also part of A
asymmetric: it is not possible for A to be part of B and B to be part of A at the same time
There are two types:
Shared Aggregation (UML Class)
A sharedaggregation expresses “a weak belonging of the parts to a whole” where parts also exist independently of the whole. Multiplicity at the aggregating end may be ≥1 hence one element can be part of multiple other element at the same time. Syntax is a hollow diamond at the aggregating end.
A composition is an existence dependency between the composite object and its parts. One part can only be contained in at most one composite object at one specific point in time. Multiplicity at aggregating end is at maximum 1, the composite objects form a tree.
If the composite object is deleted, its parts are also deleted.
Syntax: solid diamond at the aggregating end.
For example, a Beamer is part of LectureHall which is part of Building.
It’s not possible to completely extract classes, attrs, associations from a natural language text automatically. In general, we follow some guidelines for making class diagrams:
nouns indicate classes
adjectives indicate attribute values
verbs indicate operations
Example: Library Management
The library management system stores users with their unique ID, name and address as well as books with their title, author and ISBN number. Ann Foster wants to use the library.
Individuals of a system often have identical characteristics and behaviour.
A class is a construction plan for a set of similar objects of a system.
Objects can similarly be drawn in the class diagram.
Association vs. Regular Class
Example: Institute Class Diagram
Given the following specification, we can construct a class diagram:
“There is a distinction between research and administrative personnel”
“A university consists of multiple faculties which are composed of various institutes.”
“Each faculty is led by a dean, who is an employee of the university.”
“Research associates are assigned to at least one institute.”
“Furthermore, research associates can be involved in projects for a certain number of hours.”
“Some research associates hold courses. Then they are called lecturers.”
Consistency Rules
Consistency Rules (UML Class)
The following consistency rules should be followed:
no two attributes with the same name in a class
no attributes and roles with the same name
no two associations from one class with the same role names at their other ends - even if they end at different classes
Configuration management (CM) is concerned with the policies, processes and tools for managing changing software systems. It is useful as software systems are constantly changing during development and use, it is used as it is easy to lose track of what changes and component versions have been incorporated into each system version. CM is essential for team projects to control changes made by different developers.
Version management: keeping track of multiple versions of system components and ensuring that changes made to components by different developers do not interfere with each other.
Change management: keeping track of requests for changes to the software from customers and developers, working out the costs and impact of changes, and deciding the changes that should be implemented.
Agile development where components and systems are changed several times per day, is impossible without using CM tools. The definitive versions of components are held in a shared project repository and developers copy these into their own workspace.
Developers make changes to the code then use system building tools to create a new system on their own computer for testing, once they are happy with the changes, they return the modified components back to the project repository.
Development phases
Development phase
A development phase is where the development team is responsible for managing the software configuration and new functionality being added to the software.
A system testing phase is where a version of the system is released internally for testing, no new system functionality is added. Changes made are bug fixes, performance improvements, and security vulnerability repairs.
A release phase is where the software is released to the customers, new versions of the released system are developed to repair bugs, vulnerabilities and to include new features.
For large systems, there is never just one ‘working’ version of a system. There are always several versions of the system at different stages of development. There may be several teams involved in the development of different system versions.
A baseline is a collection of component versions that make up a system. Baselines are controlled, which means that the versions of the components making up the system cannot be changed. This means that it is always possible to recreate a baseline from its constituent components.
Branching is the creation of a new codeline from a version in an existing codeline. The new codeline and the existing codeline may then develop independently.
A software configuration item is anything associated with a software project (design, code, test data, document, etc.) that has been placed under configuration control. There are often different versions of a configuration item. Configuration items have a unique name.
Merging is the creation of a new version of a software component by merging separate versions in different codelines. These codelines may have been created by a previous branch of one of the codelines involved.
A version is an instance of a configuration item that differs, in some way, from other instances of that item. Versions always have a unique identifier.