Download presentation
Presentation is loading. Please wait.
1
1 A Student Guide to Object- Orientated Development Chapter 9 Design
2
2 Design Analysis describes WHAT a system must do Design describes HOW to do it Analysis decisions are implementation- independent Design decisions are implementation- dependent
3
3 Design Design activities: overall system design detailed design
4
4 Overall system design designing the overall architecture of the system selecting a strategy for coping with persistent data designing a user interface choosing software and hardware platforms producing a test plan
5
5 Design - overall Product of overall design activities layered diagram of the system architecture a set of component and deployment diagrams a database definition a test plan screen and report layouts
6
6 Design - detailed Product of detailed design activities a set of detailed class diagrams supporting documentation such as data dictionary and operation specifications a set of detailed interaction diagrams
7
7 Architecture Architecture describes the software and hardware components of the system
8
8 Architecture -software logical software components : classes, packages, subsystems Modelled with class diagrams etc. physical software components : executable files, class libraries and databases Modelled with component diagrams
9
9 Architecture - hardware Hardware architecture : the computers, peripherals and networks on which the system will run hardware architecture is modelled using deployment diagrams.
10
10 Packages and dependencies A package is a UML mechanism for grouping modelling elements Does not represent anything in the system, but is used to group modelling elements that do Can be used to group use cases, classes, collaborations, sub-systems etc
11
11 We can also use packages to nest models
12
12 Dependencies A dependency exists between packages if a change in one can affect the other. If a change in package A can affect package B, then package B depends on package A.
13
13 Dependencies Dependency
14
14 Dependencies A dependency exists between two classes if they have a client-server relationship
15
15 Layered architecture In a layered architecture, packages are arranged into layers so that each layer only uses the services of the layer below it.
16
16 the presentation layer near the top data storage layer towards the bottom application layers in the middle Layered architecture
17
17 Layered architecture
18
18 Implementation diagrams Component diagram - models physical software components Deployment diagram - models hardware components
19
19 Component diagram Hiring.java Maintenance.java Database
20
20 Deployment diagram
21
21 User interface Should be consistent: screen layouts should follow the same general pattern similar tasks should be performed in similar ways messages from the system to the user should always be in the same format. ·
22
22 User interface User tasks that are boring and prone to error should be minimized system should provide shortcuts for experienced users data should be entered by selecting from a menu rather than typing screens should be free of clutter, containing all the relevant information and no more. An overcrowded screen is tiring to look at and irritating to work with.
23
23 User interface - example
24
24 Dealing with persistent data Object-oriented and relational databases A database stores, organizes and maintains data to support the operations of an organization An object-oriented database provides the facilities of a traditional database, and supports the complex data structures of object-oriented systems However, for an information system, such as Wheels, a developer would be much more likely to choose a relational database.
25
25 Dealing with persistent data Object-oriented and relational databases Relational databases are established, proved efficient for the sort of data found in information systems like Wheels Object-oriented databases relatively recent Business organizations have invested money in relational database systems - reluctant to throw it away in order to change to an object-oriented database
26
26 Dealing with persistent data Linking an object-oriented program to a relational database For an O-O program to access a relational database we need code to establish a connection JDBC (Java Database Connectivity) - interface that interacts with both the code and the database
27
27 Implementing a class diagram in a relational database Basic rule - one class maps to one table Bike table Primary key Bike class
28
28 Implementing a in a relational database: Implementing a one to many association in a relational database: First method One to many association Customer table Payment table Customer-Payment table
29
29 Implementing a in a relational database: Implementing a one to many association in a relational database: Second method One to many association Customer table Payment table with foreign key foreign key
30
30 Implementing a in a relational database Implementing a inheritance in a relational database Inheritance relationship normal bikes specialist bike
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.