 |
|
 |
Rhapsody in C Case Study |
 |
 |
 |
 |
Case Study : Cash Register
Cash Register Requirements I
Cash Register Requirements II
Before we start I
Before we start II
Before we start III
Profiles
CProfile
Using the Profile
Cash Register
Referenced Profile
Project Description
Word Requirement document
Requirements
RequirementsPkg
Controlled File
Capturing Requirements
Gateway
Gateway Configuration
Choosing Word
Analyzing the Project
Showing Word Requirements in Gateway
Word Coverage Analysis
Adding Requirements to Rhapsody
Adding Requirements to Rhapsody
Requirements in Rhapsody
Analysys
AnalysisPkg
Principal Uses
Actors
Sum the cost of selected products
Configure the products
Secondary Use Cases
The browser
Keep count of selected products
Generate a ticket showing total cost
Manage special offers
Navigation
Hyperlink
Following the hyperlinks
Use Case Driven Approach
Use Case 1
Which Architecture?
Hardware independent
Using Interface classes
Ports
Class, Object or File?
Code generation for a Class
Code generation for a Singleton Object
Code generation for a File
When to use a File, Singleton Object or Class?
CashRegisterPkg
Package Architecture
Domain Overview
InterfacesPkg
CashRegister Overview
Structure View
Adding a port
Port contracts
CashRegister description
Product Database Overview
Product Database File
Dependency
Product class
Product attributes
Enable Dynamic Memory Allocation
Product Initializer
Generated Code
RiCCollection
RiCCollection overview
Ordered Relation
RiCList
RiCList overview
Qualified Association
RiCMap
RiCMap overview
Generated operations
Generated operations
Creating Products
Invoking configureProductDatabase
Tester
Tester port
Tester Build
Component
Configuration
Save / Generate / Make / Run
Instances
Initialized objects
Use Case 2
Scenarios
Scenario: Selecting products
Starting the scenario
Adding a message
Adding more messages
Adding more operations
Finishing the scenario
Analysis Sequence Diagram
Realizing the messages
Browser
Operation evShow()
Event Reception evShow()
Operation addProduct()
In / Out / InOut
evBarcode
identifyProduct()
getProduct()
Browser
Scenario cancelling products
Browser
Private operations
CashRegister statechart
Completing the statechart
Ordered relation
CashRegister addProduct()
show()
Accessor getName()
Include
Add to model
Include Stdio.h
Scope
endSession()
identifyProduct
isNoMoreProducts()
removeLastProduct()
startSession()
getProduct()
Handling evShow
Tester show() operation
printf
Events
Save / Generate / Make / Run
Capturing Behavior
Running a scenario
Injecting events
Automating the tests
IKeyboard
Tester statechart
Sub-Statechart
Another sub-statechart
Stub-connectors
Save / Generate / Make / Run
Running a scenario
Why isn’t the show operation always called?
Re-Running the scenario
Scenario manually entering a barcode
Event receptions
Managing keys
CashRegister Statechart
Waiting for keys
Active class
RiCTask
Overloading execute()
execute()
execute()
parse() operation
Tester parse() operation
Starting the Thread
Thread properties
Execution
Threads
Setting a breakpoint
Updating the use case
Use Case 3
“Generate a ticket” use case
itsCountedProduct
CountedProduct
increment()
CountedProduct initializer
Adding a scenario
Completing the scenario
evPrint
print() operation
Handling evPrint
print()
CountProducts operation
generateTicket() operation
endSession()
Printing a ticket
Using the Tester to print a ticket
Executing the scenario
Referenced Sequence Diagrams
Use Case 4
Enumerated type
SpecialOffer Overview
getPrice() operation
getPrice() implementation
Assigning the SpecialOffer
Product special offer
CountedProduct special offer
Generate Ticket()
Kiwis are “Buy one get one free!”
Some extensions
Requirements revisited
Extended Exercise
Changing the hardware
Gui Overview
GuiBuild
GuiPrototype
WebEnable
Attributes
Operations
More operations
GuiHardware statechart
http://localhost/
Improving the webpage
WebManaged Files
http://localhost/cashregister.htm
|
 |
 |
|
 |