Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Orientated Analysis, Design and Programming

Similar presentations


Presentation on theme: "Object-Orientated Analysis, Design and Programming"— Presentation transcript:

1 Object-Orientated Analysis, Design and Programming
Presentation by Dr. Phil Legg Senior Lecturer Computer Science 1: Introduction Autumn 2016

2 Aims of the Module To develop understanding of Object-Oriented design concepts. To be able to use UML to analyse and design a system, based on Object-Orientated concepts. To implement a system based on Object-Orientated design methods, using suitable a programming language (e.g. Java).

3 Useful Reading “UML Distilled: A Brief Guide to the Standard Object Modelling Language (Object Technology S.)”, by Martin Fowler and Kendall Scott. “Introduction to Java Programming – Comprehensive” by Daniel Liang. Course notes and websites

4 Course Outline 20th September 27th September 4th October 11th October
Object-Orientated Design and Use Cases Object and Class Design Class Relationships Java Programming Interaction Modelling Inheritance, Abstract Class and Interface Graphical User Interface Design in Java Design Patterns Concurrency Sockets and Datagrams Recap and Summary Revision 20th September 27th September 4th October 11th October 18th October 25th October 1st November 8th November 15th November (tbc) 22nd November (tbc) 29th November 6th December

5 About Me Dr. Phil Legg phil.legg@uwe.ac.uk
Office: 2Q17 ( to book an appointment) I am also the current Academic Personal Tutor for MSc Software Engineering. Any questions – feel free to ask me!

6 Object-Orientated Design

7 Object-Orientation A ‘car’ could be considered to be a large system.
What do we mean by an ‘Object’? An object has some states (e.g., data/variables) An object has some behaviours (e.g., functions/methods) Large systems can be made up of smaller objects. A ‘car’ could be considered to be a large system. Made up of smaller components (e.g., wheels, engine, gears, etc.). How they interact with each other makes them a ‘car’ What else could be described using OO?

8 “Mission Impossible” DVD
Objects make up systems getTotalPrice() Shopping Basket “Shopping” System getCost() getCost() getCost() “War and Peace” Book “Definitely Maybe” CD “Mission Impossible” DVD

9 There may be more than one way to achieve the same result
OO design Design is an Art There may be more than one way to achieve the same result Rationale Justification Reflection Easy to maintain Cohesion Loose coupling Use cases capture system required functionalities Class model, interaction model and state/activity models capture the logical design of the system Use cases bridges the gap between requirement documents and the logical design Using the logical design, we create physical implementation using a specific programming language (e.g., Java) Design helps to perform thorough testing

10 UML “The Unified Modelling Language (UML) is a language for specifying, visualizing, constructing, and documenting the artefacts of a software-intensive system.” [UML Specification 2.0] .” See for more detail on the latest specification of UML

11 UML Diagrams Two types: Structure and Behaviour
Structure: static view , not about order of interaction, e.g. class diagram Behaviour: dynamic behaviour e.g. use case diagram illustrate how users interact with the system e.g. sequence diagram focusing on interaction between objects and the sequence of these interaction

12 UML Diagram Notation Use Case Diagram

13 UML Diagram Notation Class Diagram

14 UML Diagram Notation Sequence Diagram

15 Communication Diagram
UML Diagram Notation Communication Diagram

16 In-Class Activity Read the "UWEfilm Cinema Booking System" case study
This case study will be used throughout the course

17 Use Cases and Actors Use case is “… a means for specifying required usages of a system” [UML spec. v2.0]. Software designer maps groups of related scenarios to a series of use cases (captures the functional requirements) establishes who (actors) interact with the use cases, and which use cases work with each other “An actor specifies a role played by a user or any other system that interacts with the subject.” [UML spec. v2.0] Use Case Diagram

18 Actors Actors represent the role of someone or something that interacts with the system. Actors need not be human, they may be external systems (e.g., credit card verification system) that reside outside of the scope of the system currently being modelled but their involvement is required in order to meet the goals of the system. Interaction between Actors and Systems Actor System Actor request to search for Widget System displays list of potential Widgets Actor chooses Widget System provides Widget details Actor amends Widget details System update Widget details Iconic forms of Actors used in UML

19 Content of Use Case A textual narrative that describes the functionality or requirements that the use case represents For example, a use case that represented the process of buying an item would be given a name like “Purchase Item”. The contents would be a description describing of the process of purchasing an item. This description normally describes a series of interactions between the system and the actor. This process normally yields a result that is of value to the actor Use Case Diagram

20 Example Use Case Buying a Product (from UML Distilled p101)
Customer browses catalogue and selects item to buy Customer goes to the check out Customer fills in shipping information System presents full pricing information Customer fills in credit card information System authorizes purchase System confirms sale System sends confirming to customer Extensions 3a: Customer is a regular customer System displays current shipping information Customer may accept or override 6a: System fails to authorize credit purchases Customer may re-enter credit card information or may cancel

21 In-Class Activity Produce a Use Case diagram for UWEfilm
Discussion about the Use Case diagrams

22 UML Use Case Relationships
Buying a Product (from UML Distilled p101) Include To factor common behaviour Promotes reuse of functionality Extend To factor variants of behaviour Promotes new and/or optional functionality

23 Include Relationship

24 Extend Relationship

25 Look at the various modelling tools available (e.g., StarUML, ArgoUML)
In-Class Activity Look at the various modelling tools available (e.g., StarUML, ArgoUML) Produce the UWEfilm use case diagram using a modelling tool of your choice Broaden your knowledge by searching online to see other examples where Use Cases have been used. Discuss these using the online “Discussion Board” on Blackboard.


Download ppt "Object-Orientated Analysis, Design and Programming"

Similar presentations


Ads by Google