03 October, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 14 Statechart Diagrams.

Slides:



Advertisements
Similar presentations
Systems Approach Universal System INPUT PROCESS OUTPUT
Advertisements

Switch code for Lab 4.2 switch (input) { /* input is a variable that we will test. */ case 'M': printf("The prefix is equal to 1E6.\n"); break; case 'k':
UML State Machine Diagrams and Modeling
Manufacturing Microwaves A company produces both small and large microwave ovens. Machine time: 4 hours for small ovens and 3 hours for large ones. A total.
2-Hardware Design of Embedded Processors (cont.) Advanced Approaches.
In this presentation you will:
SWE Introduction to Software Engineering
Introduction to Computers and Programming Lecture 10: For Loops Professor: Evan Korth New York University.
The State Pattern Joshua Hertz Nik Reiman. Roadmap What is the State Pattern What is the State Pattern Modeling States Modeling States Setup of the State.
Programming Lecture #4 CS 101 Autumn 2006 Tariq Jadoon.
Lecture 9 & 10: Finite Machines Anita S. Malik Adapted from Schach (2004) Chapter 11.
Electrical Circuits.
CS451 Introduction to Software Engineering Behavioral Modeling.
Software Engineering 8. System Models.
Chapter 5 – System Modeling
Chapter 5 – System Modeling
Systems Approach Universal System  We use a systems diagram to analyse technology.  All systems can be analysed and simplified in terms of their inputs,
Kris Horn Santhoshi Smitha Thota Uday Chandra Karrotthi.
1 CSC241: Object Oriented Programming Lecture No 27.
Lecture 2 Event driven programming Mobile and Handheld Applications1 Programming of Handheld and Mobile Devices Lecture 2: Event driven programming concepts.
Timers in Unreal By Todd Brown. Setting up a timer Add ‘simulated function Timer()’ to your class Within this function, put the code for whatever you.
Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1.
CSE 251 Dr. Charles B. Owen Programming in C1 States and State Machines.
Executable UML The Models are the Code - Executable UML Lecture 7 - Getting a Lifecycle Paul Krause.
Chapter 5 System Modeling (2/2) Yonsei University 2 nd Semester, 2014 Sanghyun Park.
 2002 Prentice Hall, Inc. All rights reserved. Appendix H – Elevator Model Outline H.1 Introduction H.2 Class ElevatorModel H.3Classes Location and Floor.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 7 Clicker Questions September 22, 2009.
3-1 State Design Pattern C Sc 335 Rick Mercer. State Design Pattern State is one of the Behavioral patterns It is similar to Strategy Allows an object.
Information System Design IT60105
Microwave Oven Controller
Offset Length Description 0 2 An INT 20h instruction is stored here 2 2 Program ending address 4 1 Unused, reserved by DOS 5 5 Call to DOS function.
 2003 Prentice Hall, Inc. All rights reserved. Appendix E – Elevator Model Outline E.1 Introduction E.2 Class ElevatorSimulation E.3Classes Location and.

 2006 Doan Van Ban, IOIT. All rights reserved. 1 Case Study: E levator System Simulation Program Goal –Software simulator application –N-floor elevator.
CSCI1600: Embedded and Real Time Software Lecture 7: Modeling II: Discrete Systems Steven Reiss, Fall 2015.
Elevator Example.
Chapter 5 – System Modeling Lecture 9 Section A 27/4/2015 Section B 29/4/2015 1Chapter 5 System modeling.
Chapter 6: System Models Omar Meqdadi SE 273 Lecture 6 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
State Machine Diagram Chapter 5 Introduction Pages
State diagrams Practice 5. Task 1  After the creation of the article “Paper” is only a draft “Draft”. After sending (“send”) this article is considered.
1 Run-to-Completion Non-Preemptive Scheduler. 2 In These Notes... What is Scheduling? What is non-preemptive scheduling? Examples Run to completion (cooperative)
2-Hardware Design of Embedded Processors (cont.) Advanced Approaches.
Elevator Example. Problem GSU schedules to upgrade all the campus elevators in 6 months. Due to incompatibility with the new hardware, the current software.
CSCI1600: Embedded and Real Time Software Lecture 10: Modeling IV: Compositions of State Machines Steven Reiss, Fall 2015.
State machine executed on a change of enable OR evening OR timer.
Interface, Subclass, and Abstract Class Review
2-Hardware Design of Embedded Processors (cont.)
Three Minute Timer Two Minute Timer One Minute Timer
IS301 – Software Engineering V:
TESTBED ACADEMY Final Exam.
Dell Customer Support Service REACH AT Dell Support : Give a Ring on:
Tips Need to Consider When Organizing a College Event
& Microwave Engineering
Conditional Statements
BUTTERFLY EFFECT DIAGRAM
Programming - Timers Intro to Robotics.
Simple Windows Applications
ماجستير إدارة المعارض من بريطانيا
CSCI1600: Embedded and Real Time Software
State Machines Massimo Felici.
Finite State Machines in Games
CS310 Software Engineering Dr.Doaa Sami
Survey of the 2.45GHz microwave field
Types of error in accounting The correction of errors
[Event Title Here] [Event Title Here] [Event Title Here]
Enum.
Types of Errors And Error Analysis.
Digital System Design ASMD based Design
CSCI1600: Embedded and Real Time Software
G6DICP - Lecture 5 Control Structures.
Presentation transcript:

03 October, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 14 Statechart Diagrams

03 October, 2007Information System Design IT60105, Autumn 2007 Lecture #14 How a statechart diagram can be converted to its code?

03 October, 2007Information System Design IT60105, Autumn 2007 Example: Microwave Oven

03 October, 2007Information System Design IT60105, Autumn 2007 Designing Class

03 October, 2007Information System Design IT60105, Autumn 2007 State Attributes class Microwave { State : IdleWithDoorOpen, IdleWithDoorClose, Initial, CookingInterupted, Extend, CookingCompleted; State MyState; Class Tube p; Class Light l; Class Timer t; Class Beeper b; Class Door d; Contd. on

03 October, 2007Information System Design IT60105, Autumn 2007 Internal Actions class Microwave { State : IdleWithDoorOpen, IdleWithDoorClose, Initial, CookingInterupted, Extend, CookingCompleted; State MyState; void TurnOnLight(); void TurnOffLight (); void TurnOffTube(); void TurnOnTube(); void ClearTimer(); void SetTimer(); void SoundWarningBeep(); void Add1MinuteToTimer(); void OnEntry();

03 October, 2007Information System Design IT60105, Autumn 2007 Events Actions class Microwave { void DoorOpen(); void DoorClosed(); void ButtonPushed(); void TimerTimeout(); }

03 October, 2007Information System Design IT60105, Autumn 2007 Defining OnEntry() 1.void Microwave :: OnEntry () { 2.switch (MyState) { 3.case IdleWithDoorOpen: 4.TurnOnLight(); 5.break; 6.case IdleWithDoorClose: 7.TurnOffLight(); 8.break; 9.case Initial: 10.SetTimer(); 11.TurnOnLight(); 12. TurnOnTube(); 13.break; Contd… 14. case Extended : 15. Add1MinuteToTimer(); 16.break; 17.case CookingInterupted: 18.TurnOffTube(); 19.ClearTimer(); 20.break; 21.case CookingCompleted: 22.TurnOffTube(); 23.TurnOffLight(); 24. SoundWarningBeep(); 25.break; 26.default : // Should signal error here.. }

03 October, 2007Information System Design IT60105, Autumn 2007 Defining DoorOpen() void Microwave :: DoorOpen () { switch (MyState) { case IdleWithDoorOpen: break; case IdleWithDoorClose: MyState = IdlewithDoorOpen; OnEntry(); break; case Initial: MyState = cookingInterupted; OnEntry(); break; case Extended : MyState = CookingInterupted; OnEntry(); break; case CookingInterupted: break; case CookingCompleted: MyState = IdlewithDoorOpen; OnEntry(); break; default : // Should signal error here.. }

03 October, 2007Information System Design IT60105, Autumn 2007 Example: Stack Machine ???