You are on page 1of 13

Unified Modelling Language(UML)

Restaurant System : Implementation

Dr. Myat Mon Kyaw


Faculty of Information Science
University of Computer Studies (Yangon)

1
Objectives
 To study the aspects of the implementation of the restaurant booking system

 To learn about the component diagram and deployment diagram

 To understand the implementation strategies in UML

 To study about Java AWT framework

 To study how to implement class and associations

2
Outlines
 Implementation Diagrams
 Implementation Strategies
 Application Frameworks
 The Java AWT Framework
 Implementation of Classes
 Implementation of Associations
 Implementation of Operations

3
Implementation Diagrams
 The documentation (the analysis and design) describes the logical structure of
the software application
 A system basically as a collection of classes, possibly subdivided into a number
of packages
 The dynamic behaviour of instances of the classes is further defined by means
of interaction diagrams and statecharts
 When the system is implemented,
 Takes on a physical form (a collection of files of source code)
 Compiled, generating various object, executable or library files
 files are executed on one or more processors
4
Two Types of Implementation Diagrams
 Documenting various aspects of the physical structure of a system

 Component Diagram

 document the physical components of the system and relationships


between them

 Deployment diagrams
 document how those components are mapped onto physical processors

5
Components
 Physical entities, which represent part of a system.
 Different types of components - source code files, executable files,
libraries, database tables and so on.
 UML notation, as a rectangle with smaller rectangles embedded in its
boundary

Figure 7.1 A component implementing a class

 The dependency between a class and the component implementing is


labelled with the ‘trace’ stereotype. 6
Component Diagrams

 Show components linked by


dependencies
 Represent the compilation
dependencies between components
 A compilation dependency exists
when in order to compile one, the
other one has to be available.

Figure 7.2 Component diagram for Booking System

7
Deployment Diagrams
 Show how the components in a system are mapped onto processors when a
system is deployed
 Processing nodes are represented as cuboids
 Components that are deployed on the node are shown ‘inside’ the cuboid

Figure 7.3 Deployment diagram for Booking System


8
Implementation Strategies

 Top-down implementation

 Starts with the higher-level components, and proceeds ‘downwards’

 Bottom-up implementation

 Starts with the lower-level classes and proceeds ‘up’ the diagram

9
Top-down Implementation
 Advantage
 The overall design of the system can be tested early on in the process
 Disadvantage
 Stubs, temporary implementations, need to be created for lower-level
classes
 Replaced later by real implementations of these classes as development
progresses

10
Bottom-up Implementation
 Advantage
 Makes the development and testing of individual components easier
 When a class is implemented, all the classes on which it depends have
already been implemented
 it can easily be compiled and tested without the need to develop stubs
 Disadvantage
 Runs the risk of postponing the generation of a complete executable
program until quite a late stage in implementation

11
Compromise Between Two Approaches

 Adopt a more iterative approach and think of implementing use cases rather
than classes

 Developers implement those features of each class that are required to


support a single use case and then fully tested.

 Then further use cases are implemented one by one by adding additional
features to the classes as required.

12
Next Lecture
Thank You.

Application Framework

13

You might also like