SlideShare a Scribd company logo
Arab Open University
2nd
Semester, 2006-2007
M301
Unit 5.1
From Model to
Implementation
reem.attas@arabou.org.sa
Reem AlAttas © 2
Topic Road Map
 Moving towards Implementation
From Requirements to Code
Controlling Inheritance
Using Tools to Automate Development
Modeling Implementation and Deployment
Reem AlAttas © 3
When do you stop modeling?
When it is easier to construct code than
building more models.
Reem AlAttas © 4
Using activity diagrams for operations
Activity diagrams:
 Show the flow of control from one activity to
another.
 Used to investigate the different scenarios in a
use case.
 Show the steps required to collect the set of
rules governing an operation.
Reem AlAttas © 5
Class model shows payments made
against a hotel bill
Reem AlAttas © 6
A set of rules for payment
authorization
 The hotel need to authorize a payment by
cheque or credit card.
Reem AlAttas © 7
Sequence diagrams
Used to illustrate the possible scenarios
for performing a use case.
Reem AlAttas © 8
An example of cheque authorization
 One of the hotel’s managers, John, has authorized a
cheque, p101, for payment against a bill, b99.
Reem AlAttas © 9
Topic Road Map
Moving towards Implementation
 From Requirements to Code
Controlling Inheritance
Using Tools to Automate Development
Modeling Implementation and Deployment
Reem AlAttas © 10
From requirements to implementation
Pre- and post-conditions were recoded in
natural language.
If you want to incorporate them into Java
code as executable statements, you will
need to express them in the Java
language.
Reem AlAttas © 11
Assertion
A statement that can be true or false in a
similar way that a Boolean expression will
be either true or false in Java.
Reem AlAttas © 12
An ‘extended’ Java syntax for an
assertion handling
 @pre indicates the value of the expression when
the method started its execution.
Reem AlAttas © 13
The absence of pre- or post-
conditions
 This does not mean that no pre-condition
applies: it is simply a way of saying that the pre-
condition is true.
Reem AlAttas © 14
Not all assertions are easy to express
in a programming language
If it is not possible to express an assertion
formally (in a programming language) it is
good practice to include it informally (in
natural language).
This can be done by including its natural
language version as a comment in the
appropriate pre, post or invariant clause.
Reem AlAttas © 15
… Not all assertions are easy to
express in a programming language
Reem AlAttas © 16
Invariants and their relationship to pre-
and post-conditions
 The invariant is considered as part of both the
pre- and the post-conditions.
 Before a method can be executed both the invariant and
the pre-condition must hold.
 After the method has completed, the invariant and the
post-condition must hold.
Reem AlAttas © 17
The supplier code
 The implementation (code) of a method.
Reem AlAttas © 18
The client code
 How to call the method?
 Suppose that acct1 is an object of type
BankAccount.
Reem AlAttas © 19
Monitoring assertions
Reem AlAttas © 20
Topic Road Map
Moving towards Implementation
From Requirements to Code
 Controlling Inheritance
Using Tools to Automate Development
Modeling Implementation and Deployment
Reem AlAttas © 21
Forms of Inheritance
Inheritance for
 Specialization.
 Specification.
 Construction.
Reem AlAttas © 22
Inheritance without redefinition of
methods
 Since SavingsAccount
and
SpecialSavingsAccount
are related via
generalization, it means
that an object of class
SpecialSavingsAccount
is-a object of class
SavingsAccount.
Reem AlAttas © 23
… Inheritance without redefinition of
methods
The methods that SpecialSavingsAccount
inherits from SavingsAccount have the
same contracts as those in
SavingsAccount.
Inheritance without redefinition guarantees
that this will be the case.
Reem AlAttas © 24
Inheritance with redefinition
 Redefined methods
automatically inherit the
pre- and post-conditions
of their parent methods.
 Any invariant clause of
the parent class should
also be inherited by the
child class.
addInterest ()
Reem AlAttas © 25
Topic Road Map
Moving towards Implementation
From Requirements to Code
Controlling Inheritance
 Using Tools to Automate Development
Modeling Implementation and Deployment
Reem AlAttas © 26
Definitions
 Engineering: generic term often used to describe the
building of an artifact (e.g. software, car, rocket) from
some kind of model.
 Forward engineering: is a synonym for the engineering
process that is often used in CASE tools.
 Code generation: the normal forward engineering
process which automatically generates code.
Reem AlAttas © 27
... Definitions
Reverse engineering: is the derivation of
a model from an artifact (which, in the
case of S/W engineering is usually source
code).
Reem AlAttas © 28
... Definitions
 Round-trip engineering: going from model to
code and back again (perhaps repeatedly) to
ensure the consistency between model and
code.
 Simultaneous round-trip engineering: edit
code or model and have the other updated
automatically.
Reem AlAttas © 29
Topic Road Map
Moving towards Implementation
From Requirements to Code
Controlling Inheritance
Using Tools to Automate Development
 Modeling Implementation and
Deployment
Reem AlAttas © 30
Nodes (processing resources)
Run-time, physical objects which have at
least a memory and often processing
capability as well.
Nodes include:
 computing devices.
 human resources.
 mechanical processing resources.
Reem AlAttas © 31
Real-world constraint on how a system
may be built and maintained
 The current capabilities of the technology and
probably the budget of the customer.
 Non-functional requirements, such as response
time or robustness, cannot be modeled.
 The programming language and the
environment in which it is coded and
documented.
Reem AlAttas © 32
Component
Any distributable part of a system, which
might include executable software, source
code for the software, user manuals or
documentation, or even a specialized
piece of hardware.
If an object can be touched, or stored on a
medium that can be touched, then it can
be a component.
Reem AlAttas © 33
Component Symbol
Reem AlAttas © 34
A simple component diagram showing
a dependency
class
Reem AlAttas © 35
Simple Java program & its
corresponding component diagram
Reem AlAttas © 36
Deployment diagram
 Indicates only the components that are active at
run-time.
Reem AlAttas © 37
Deployment diagram for home banking
Reem AlAttas © 38
Packages
class
TMA5 – Q1
Thank You!

More Related Content

Viewers also liked

magnetojet_proposal
magnetojet_proposalmagnetojet_proposal
magnetojet_proposalJack Rollan
 
The colors
The colorsThe colors
The colors
yury90
 
Teoria 1
Teoria 1Teoria 1
Teoria 1
azulcervantes9
 
Fundamenteel Eerste Hulp Voor Medische Noodgevallen
Fundamenteel Eerste Hulp Voor Medische  NoodgevallenFundamenteel Eerste Hulp Voor Medische  Noodgevallen
Fundamenteel Eerste Hulp Voor Medische Noodgevallen
Ronald Loermans
 
From Model to Implementation II
From Model to Implementation IIFrom Model to Implementation II
From Model to Implementation II
Reem Alattas
 
actividades
actividadesactividades
actividades
chelsey98
 
A personal finance jb
A personal finance jbA personal finance jb
A personal finance jbJohn Becker
 
Dialogg @ APPlicera hälsa, Forum för Välfärd
Dialogg @ APPlicera hälsa, Forum för VälfärdDialogg @ APPlicera hälsa, Forum för Välfärd
Dialogg @ APPlicera hälsa, Forum för Välfärd
Marcus Linder
 
Cancer al cuello uterino
Cancer al cuello uterinoCancer al cuello uterino
Cancer al cuello uterino
Catalina Solano
 

Viewers also liked (10)

Treball definitiu
Treball definitiuTreball definitiu
Treball definitiu
 
magnetojet_proposal
magnetojet_proposalmagnetojet_proposal
magnetojet_proposal
 
The colors
The colorsThe colors
The colors
 
Teoria 1
Teoria 1Teoria 1
Teoria 1
 
Fundamenteel Eerste Hulp Voor Medische Noodgevallen
Fundamenteel Eerste Hulp Voor Medische  NoodgevallenFundamenteel Eerste Hulp Voor Medische  Noodgevallen
Fundamenteel Eerste Hulp Voor Medische Noodgevallen
 
From Model to Implementation II
From Model to Implementation IIFrom Model to Implementation II
From Model to Implementation II
 
actividades
actividadesactividades
actividades
 
A personal finance jb
A personal finance jbA personal finance jb
A personal finance jb
 
Dialogg @ APPlicera hälsa, Forum för Välfärd
Dialogg @ APPlicera hälsa, Forum för VälfärdDialogg @ APPlicera hälsa, Forum för Välfärd
Dialogg @ APPlicera hälsa, Forum för Välfärd
 
Cancer al cuello uterino
Cancer al cuello uterinoCancer al cuello uterino
Cancer al cuello uterino
 

Similar to From Model to Implementation I

Process Quality Management, Human Resources, Quality Assurance
Process Quality Management, Human Resources, QualityAssuranceProcess Quality Management, Human Resources, QualityAssurance
Process Quality Management, Human Resources, Quality Assurance
Reem Alattas
 
Approaches to Software Development
Approaches to Software DevelopmentApproaches to Software Development
Approaches to Software Development
Reem Alattas
 
Reactive applications tools of the trade huff po
Reactive applications   tools of the trade huff poReactive applications   tools of the trade huff po
Reactive applications tools of the trade huff po
shinolajla
 
"Concurrent React 18. "I might do it later"", Mykola Yenin
"Concurrent React 18. "I might do it later"", Mykola Yenin "Concurrent React 18. "I might do it later"", Mykola Yenin
"Concurrent React 18. "I might do it later"", Mykola Yenin
Fwdays
 
SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016
Ricardo Amaro
 
What is the Next Generation for Application Managed Services?
What is the Next Generation for Application Managed Services?What is the Next Generation for Application Managed Services?
What is the Next Generation for Application Managed Services?
Hexaware Technologies
 
Business Utility Application
Business Utility ApplicationBusiness Utility Application
Business Utility Application
IRJET Journal
 
Model based testing
Model based testingModel based testing
Model based testing
Maveric Systems
 
Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020
VMware Tanzu
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.net
Concetto Labs
 
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDF
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDFEnterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDF
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDFsmrobb
 
Product Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, TestingProduct Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, Testing
Reem Alattas
 
MVC
MVCMVC
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | Edureka
Edureka!
 
Memory Management in Trading Platforms
Memory Management in Trading PlatformsMemory Management in Trading Platforms
Memory Management in Trading Platforms
IRJET Journal
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
vodQA
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Haytham Ghandour
 
IRJET- E-Gatepass System
IRJET- E-Gatepass SystemIRJET- E-Gatepass System
IRJET- E-Gatepass System
IRJET Journal
 
Departure Delay Prediction using Machine Learning.
Departure Delay Prediction using Machine Learning.Departure Delay Prediction using Machine Learning.
Departure Delay Prediction using Machine Learning.
IRJET Journal
 
Application resilience: challenges and good practice
Application resilience: challenges and good practiceApplication resilience: challenges and good practice
Application resilience: challenges and good practice
aledsage
 

Similar to From Model to Implementation I (20)

Process Quality Management, Human Resources, Quality Assurance
Process Quality Management, Human Resources, QualityAssuranceProcess Quality Management, Human Resources, QualityAssurance
Process Quality Management, Human Resources, Quality Assurance
 
Approaches to Software Development
Approaches to Software DevelopmentApproaches to Software Development
Approaches to Software Development
 
Reactive applications tools of the trade huff po
Reactive applications   tools of the trade huff poReactive applications   tools of the trade huff po
Reactive applications tools of the trade huff po
 
"Concurrent React 18. "I might do it later"", Mykola Yenin
"Concurrent React 18. "I might do it later"", Mykola Yenin "Concurrent React 18. "I might do it later"", Mykola Yenin
"Concurrent React 18. "I might do it later"", Mykola Yenin
 
SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016SRE - drupal day aveiro 2016
SRE - drupal day aveiro 2016
 
What is the Next Generation for Application Managed Services?
What is the Next Generation for Application Managed Services?What is the Next Generation for Application Managed Services?
What is the Next Generation for Application Managed Services?
 
Business Utility Application
Business Utility ApplicationBusiness Utility Application
Business Utility Application
 
Model based testing
Model based testingModel based testing
Model based testing
 
Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020Accelerate Application Migration - August 5, 2020
Accelerate Application Migration - August 5, 2020
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.net
 
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDF
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDFEnterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDF
Enterprise SCADA Standardization - Nov 2010 - Digital Oilfield.PDF
 
Product Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, TestingProduct Quality: Metrics, Verification, Validation, Testing
Product Quality: Metrics, Verification, Validation, Testing
 
MVC
MVCMVC
MVC
 
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | Edureka
 
Memory Management in Trading Platforms
Memory Management in Trading PlatformsMemory Management in Trading Platforms
Memory Management in Trading Platforms
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
 
IRJET- E-Gatepass System
IRJET- E-Gatepass SystemIRJET- E-Gatepass System
IRJET- E-Gatepass System
 
Departure Delay Prediction using Machine Learning.
Departure Delay Prediction using Machine Learning.Departure Delay Prediction using Machine Learning.
Departure Delay Prediction using Machine Learning.
 
Application resilience: challenges and good practice
Application resilience: challenges and good practiceApplication resilience: challenges and good practice
Application resilience: challenges and good practice
 

More from Reem Alattas

Rumble Lights Pitch Deck
Rumble Lights Pitch DeckRumble Lights Pitch Deck
Rumble Lights Pitch Deck
Reem Alattas
 
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular RobotsNASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
Reem Alattas
 
She looks just like me 2017
She looks just like me 2017She looks just like me 2017
She looks just like me 2017
Reem Alattas
 
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space ExplorationNasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Reem Alattas
 
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space ExplorationNasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Reem Alattas
 
She Looks Just Like Me 2017
She Looks Just Like Me 2017She Looks Just Like Me 2017
She Looks Just Like Me 2017
Reem Alattas
 
Tran helmet pitch
Tran helmet pitchTran helmet pitch
Tran helmet pitch
Reem Alattas
 
Evolutionary Algorithms
Evolutionary AlgorithmsEvolutionary Algorithms
Evolutionary Algorithms
Reem Alattas
 
Evolutionary Robotics
Evolutionary RoboticsEvolutionary Robotics
Evolutionary Robotics
Reem Alattas
 
Create a Need
Create a NeedCreate a Need
Create a Need
Reem Alattas
 
Enhancing input on and above the interactive surface
Enhancing input on and above the interactive surfaceEnhancing input on and above the interactive surface
Enhancing input on and above the interactive surface
Reem Alattas
 
Skinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input SurfaceSkinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input Surface
Reem Alattas
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup Language
Reem Alattas
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event Model
Reem Alattas
 
PHP Scripting
PHP ScriptingPHP Scripting
PHP Scripting
Reem Alattas
 
DHTML - Dynamic HTML
DHTML - Dynamic HTMLDHTML - Dynamic HTML
DHTML - Dynamic HTML
Reem Alattas
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript Objects
Reem Alattas
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary Search
Reem Alattas
 
JavaScript Arrays
JavaScript Arrays JavaScript Arrays
JavaScript Arrays
Reem Alattas
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
Reem Alattas
 

More from Reem Alattas (20)

Rumble Lights Pitch Deck
Rumble Lights Pitch DeckRumble Lights Pitch Deck
Rumble Lights Pitch Deck
 
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular RobotsNASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
 
She looks just like me 2017
She looks just like me 2017She looks just like me 2017
She looks just like me 2017
 
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space ExplorationNasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
 
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space ExplorationNasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
 
She Looks Just Like Me 2017
She Looks Just Like Me 2017She Looks Just Like Me 2017
She Looks Just Like Me 2017
 
Tran helmet pitch
Tran helmet pitchTran helmet pitch
Tran helmet pitch
 
Evolutionary Algorithms
Evolutionary AlgorithmsEvolutionary Algorithms
Evolutionary Algorithms
 
Evolutionary Robotics
Evolutionary RoboticsEvolutionary Robotics
Evolutionary Robotics
 
Create a Need
Create a NeedCreate a Need
Create a Need
 
Enhancing input on and above the interactive surface
Enhancing input on and above the interactive surfaceEnhancing input on and above the interactive surface
Enhancing input on and above the interactive surface
 
Skinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input SurfaceSkinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input Surface
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup Language
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event Model
 
PHP Scripting
PHP ScriptingPHP Scripting
PHP Scripting
 
DHTML - Dynamic HTML
DHTML - Dynamic HTMLDHTML - Dynamic HTML
DHTML - Dynamic HTML
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript Objects
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary Search
 
JavaScript Arrays
JavaScript Arrays JavaScript Arrays
JavaScript Arrays
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 

From Model to Implementation I

  • 1. Arab Open University 2nd Semester, 2006-2007 M301 Unit 5.1 From Model to Implementation reem.attas@arabou.org.sa
  • 2. Reem AlAttas © 2 Topic Road Map  Moving towards Implementation From Requirements to Code Controlling Inheritance Using Tools to Automate Development Modeling Implementation and Deployment
  • 3. Reem AlAttas © 3 When do you stop modeling? When it is easier to construct code than building more models.
  • 4. Reem AlAttas © 4 Using activity diagrams for operations Activity diagrams:  Show the flow of control from one activity to another.  Used to investigate the different scenarios in a use case.  Show the steps required to collect the set of rules governing an operation.
  • 5. Reem AlAttas © 5 Class model shows payments made against a hotel bill
  • 6. Reem AlAttas © 6 A set of rules for payment authorization  The hotel need to authorize a payment by cheque or credit card.
  • 7. Reem AlAttas © 7 Sequence diagrams Used to illustrate the possible scenarios for performing a use case.
  • 8. Reem AlAttas © 8 An example of cheque authorization  One of the hotel’s managers, John, has authorized a cheque, p101, for payment against a bill, b99.
  • 9. Reem AlAttas © 9 Topic Road Map Moving towards Implementation  From Requirements to Code Controlling Inheritance Using Tools to Automate Development Modeling Implementation and Deployment
  • 10. Reem AlAttas © 10 From requirements to implementation Pre- and post-conditions were recoded in natural language. If you want to incorporate them into Java code as executable statements, you will need to express them in the Java language.
  • 11. Reem AlAttas © 11 Assertion A statement that can be true or false in a similar way that a Boolean expression will be either true or false in Java.
  • 12. Reem AlAttas © 12 An ‘extended’ Java syntax for an assertion handling  @pre indicates the value of the expression when the method started its execution.
  • 13. Reem AlAttas © 13 The absence of pre- or post- conditions  This does not mean that no pre-condition applies: it is simply a way of saying that the pre- condition is true.
  • 14. Reem AlAttas © 14 Not all assertions are easy to express in a programming language If it is not possible to express an assertion formally (in a programming language) it is good practice to include it informally (in natural language). This can be done by including its natural language version as a comment in the appropriate pre, post or invariant clause.
  • 15. Reem AlAttas © 15 … Not all assertions are easy to express in a programming language
  • 16. Reem AlAttas © 16 Invariants and their relationship to pre- and post-conditions  The invariant is considered as part of both the pre- and the post-conditions.  Before a method can be executed both the invariant and the pre-condition must hold.  After the method has completed, the invariant and the post-condition must hold.
  • 17. Reem AlAttas © 17 The supplier code  The implementation (code) of a method.
  • 18. Reem AlAttas © 18 The client code  How to call the method?  Suppose that acct1 is an object of type BankAccount.
  • 19. Reem AlAttas © 19 Monitoring assertions
  • 20. Reem AlAttas © 20 Topic Road Map Moving towards Implementation From Requirements to Code  Controlling Inheritance Using Tools to Automate Development Modeling Implementation and Deployment
  • 21. Reem AlAttas © 21 Forms of Inheritance Inheritance for  Specialization.  Specification.  Construction.
  • 22. Reem AlAttas © 22 Inheritance without redefinition of methods  Since SavingsAccount and SpecialSavingsAccount are related via generalization, it means that an object of class SpecialSavingsAccount is-a object of class SavingsAccount.
  • 23. Reem AlAttas © 23 … Inheritance without redefinition of methods The methods that SpecialSavingsAccount inherits from SavingsAccount have the same contracts as those in SavingsAccount. Inheritance without redefinition guarantees that this will be the case.
  • 24. Reem AlAttas © 24 Inheritance with redefinition  Redefined methods automatically inherit the pre- and post-conditions of their parent methods.  Any invariant clause of the parent class should also be inherited by the child class. addInterest ()
  • 25. Reem AlAttas © 25 Topic Road Map Moving towards Implementation From Requirements to Code Controlling Inheritance  Using Tools to Automate Development Modeling Implementation and Deployment
  • 26. Reem AlAttas © 26 Definitions  Engineering: generic term often used to describe the building of an artifact (e.g. software, car, rocket) from some kind of model.  Forward engineering: is a synonym for the engineering process that is often used in CASE tools.  Code generation: the normal forward engineering process which automatically generates code.
  • 27. Reem AlAttas © 27 ... Definitions Reverse engineering: is the derivation of a model from an artifact (which, in the case of S/W engineering is usually source code).
  • 28. Reem AlAttas © 28 ... Definitions  Round-trip engineering: going from model to code and back again (perhaps repeatedly) to ensure the consistency between model and code.  Simultaneous round-trip engineering: edit code or model and have the other updated automatically.
  • 29. Reem AlAttas © 29 Topic Road Map Moving towards Implementation From Requirements to Code Controlling Inheritance Using Tools to Automate Development  Modeling Implementation and Deployment
  • 30. Reem AlAttas © 30 Nodes (processing resources) Run-time, physical objects which have at least a memory and often processing capability as well. Nodes include:  computing devices.  human resources.  mechanical processing resources.
  • 31. Reem AlAttas © 31 Real-world constraint on how a system may be built and maintained  The current capabilities of the technology and probably the budget of the customer.  Non-functional requirements, such as response time or robustness, cannot be modeled.  The programming language and the environment in which it is coded and documented.
  • 32. Reem AlAttas © 32 Component Any distributable part of a system, which might include executable software, source code for the software, user manuals or documentation, or even a specialized piece of hardware. If an object can be touched, or stored on a medium that can be touched, then it can be a component.
  • 33. Reem AlAttas © 33 Component Symbol
  • 34. Reem AlAttas © 34 A simple component diagram showing a dependency class
  • 35. Reem AlAttas © 35 Simple Java program & its corresponding component diagram
  • 36. Reem AlAttas © 36 Deployment diagram  Indicates only the components that are active at run-time.
  • 37. Reem AlAttas © 37 Deployment diagram for home banking
  • 38. Reem AlAttas © 38 Packages class