Case Study! Multi-Panel Interactive System!

Size: px
Start display at page:

Download "Case Study! Multi-Panel Interactive System!"

Transcription

1 Case Study! Multi-Panel Interactive System! 24-1!

2 The Problem Domain! Build a general type of interactive system!» Users interact with a set of panels! > Web applications are an example! 24-2!

3 The Problem Domain! Build a general type of interactive system!» Users interact with a set of panels! > Web applications are an example! Each session goes through a number of states! > Finite state machine! > Automatic Teller Machine! 24-3!

4 The Problem Domain! Build a general type of interactive system!» Users interact with a set of panels! > Web applications are an example! Each session goes through a number of states! > Finite state machine! > Automatic Teller Machine!» A state corresponds to a fill-in-the-blanks panel! 24-4!

5 The Problem Domain! Build a general type of interactive system!» Users interact with a set of panels! > Web applications are an example! Each session goes through a number of states! > Finite state machine! > Automatic Teller Machine!» A state corresponds to a fill-in-the-blanks panel! > User is adding to a database of information!! 24-5!

6 The Problem Domain! Build a general type of interactive system!» Users interact with a set of panels! > Web applications are an example! Each session goes through a number of states! > Finite state machine! > Automatic Teller Machine!» A state corresponds to a fill-in-the-blanks panel! > User is adding to a database of information!» Depending upon user choices transitions occur to other states! 24-6!

7 Example Panel! Enquiry on Flights! Flight from! Somewhere! Flight to! Anywhere! Departure on or after! on or before! not soon enough! too late! Preferred airline(s):! Special requirements:! Available flights: 1! Flt# AA 42 Dep 8:25 Arr 7:45 Thru: Chicago! Choose next_action! 0 Exit 1 Help 2 Further enquiry 3 Reserve seat! 24-7!

8 A State Transition Diagram! Help! 1! Help! 1! 1! 1! 2! 1 Initial! 3! 3! 2! 1! Help! 1! 5 Confirmation! 2 Enquiry_! on_flights! 2! 3! 4 Reservation! 3! 2! 3! 2! 3 Enquiry_! on_seats! Numbers are! choices in panel! 1! 1! Help! 1! Help! 1! 24-8!

9 General Design Goals! Create a design and implementation for such applications! 24-9!

10 General Design Goals! Create a design and implementation for such applications! General & flexible solution! 24-10!

11 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about! 24-11!

12 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large!! 24-12!

13 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large! > Applications can have hundreds of states and thousands of transitions! 24-13!

14 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large! > Applications can have hundreds of states and thousands of transitions!» Structure of the system is subject to change! 24-14!

15 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large! > Applications can have hundreds of states and thousands of transitions!» Structure of the system is subject to change! > Cannot foresee all possible states & transitions! 24-15!

16 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large! > Applications can have hundreds of states and thousands of transitions!» Structure of the system is subject to change! > Cannot foresee all possible states & transitions!» No specific application is mentioned! 24-16!

17 General Design Goals! Create a design and implementation for such applications! General & flexible solution! Things to think about!» Finite state machine may be very large! > Applications can have hundreds of states and thousands of transitions!» Structure of the system is subject to change! > Cannot foresee all possible states & transitions!» No specific application is mentioned! > What if you need many variations! 24-17!

18 First Attempt! Block/Module oriented procedural! 24-18!

19 First Attempt! Block/Module oriented procedural! System made of a number of blocks! 24-19!

20 First Attempt! Block/Module oriented procedural! System made of a number of blocks!» One for each state in the FSM! 24-20!

21 First Attempt! Block/Module oriented procedural! System made of a number of blocks!» One for each state in the FSM!» Follows the Direct Mapping Rule! 24-21!

22 First Attempt 2! Enquiry_Block! display panel! repeat! get user's answer and choice C for next step! if error in answer then output error fi! until not error in answer!! Similarly for all other states! "Process answer"! Easy to devise, does the job! case C in! C0 : goto Exit_Block! Terrible for meeting requirements! C1 : goto Help_Block! C2 : goto Reservation_Block!...! esac! 24-22!

23 First Attempt 3! Enquiry_Block! display panel! repeat! get user's answer and choice C for next step! if error in answer then output error fi! until not error in answer!! "Process answer"! What are the problems?! case C in! C0 : goto Exit_Block! C1 : goto Help_Block! C2 : goto Reservation_Block!...! esac! 24-23!

24 Block Design Problems! Use goto's (Dijkstra)!» Usually symptomatic of deeper problem! 24-24!

25 Block Design Problems! Use goto's (Dijkstra)!» Usually symptomatic of deeper problem! Branch structure (goto's) are an exact implementation of the graph! 24-25!

26 Block Design Problems! Use goto's (Dijkstra)!» Usually symptomatic of deeper problem! Branch structure (goto's) are an exact implementation of the graph!» Vulnerable to change! 24-26!

27 Block Design Problems! Use goto's (Dijkstra)!» Usually symptomatic of deeper problem! Branch structure (goto's) are an exact implementation of the graph!» Vulnerable to change! > Add a new state! add new block, change all other blocks > Add a new transition! Change all blocks that should use it 24-27!

28 Block Design Problems 2! Forget reusability across applications!» Specific to one application! 24-28!

29 Block Design Problems 2! Forget reusability across applications!» Specific to one application! Want not just a solution but a quality solution!» Have to work harder! 24-29!

30 Block Design Problems 2! Forget reusability across applications!» Specific to one application! Want not just a solution but a quality solution!» Have to work harder! What does quality mean for this system?! 24-30!

31 Quality Design! A general design a set of reusable modules would be a huge benefit! 24-31!

32 Quality Design 2! A general design a set of reusable modules would be a huge benefit! Getting the problem to work is only a part of the solution and insufficient for the task! 24-32!

33 Quality Design 3! A general design a set of reusable modules would be a huge benefit! Getting the problem to work is only a part of the solution and insufficient for the task! Customer's requirements go far beyond!» mere correctness!» mere functionality! 24-33!

34 FSM Representation! Problems seems to be due to the traversal (goto) structure! The representation of the finite-state machine! 24-34!

35 FSM Representation 2! Problems seems to be due to the traversal (goto) structure! The representation of the finite-state machine! What can we do?! 24-35!

36 FSM Representation 3! Generalizing the transition diagram will gain generality!???!! 24-36!

37 FSM Representation 4! Generalizing the transition diagram will gain generality! Model the function transition as a transition table representation of a FSM!» Designate one state as initial!» One or more states as final! 24-37!

38 Transition Table! Choice! ! S! t! a! t! e! 1 Initial! 2 Flights! 3 Seats! 4 Reserv.! 5 Confirm! 0 Help! -1 Final! ! 0 1 3! 0 2 4! 0 3 5! 0 4 1! back! 24-38!

39 Top Down Decomposition! execute_session! initial! transition! execute_state! is_final! display! read! correct! message! process! 24-39!

40 Implement execute_session! execute_session! -- Execute a complete session! local state, next : INTEGER! do! state := initial -- start in initial state! repeat -- next is a VAR parameter! execute_state (state, next )! state := transition ( state, next )! until is_final ( state )! end! end! 24-40!

41 Implement execute_state! execute_state ( in s : INTEGER, out c : INTEGER )! -- c contains the user's choice for next state! local a : ANSWER ; ok :BOOLEAN! do! repeat! display (s ) -- display panel for state s! read ( s, a ) -- get user answer in a! ok := correct ( s, a )! until ok end! process ( s, a )! c := next_choice ( a ) -- get user choice for panel! end! What are the problems?! 24-41!

42 Implement execute_state 2! execute_state ( in s : INTEGER, out c : INTEGER )! -- c contains the user's choice for next state! local a : ANSWER ; ok :BOOLEAN! do! repeat! display (s ) -- display panel for state s! read ( s, a ) -- get user answer in a! ok := correct ( s, a )! until ok end! process ( s, a )! c := next_choice ( a ) -- get user choice for panel! end! State s is argument for all functions!! What will be the structure/design of display?! 24-42!

43 Top Down Problems?! Tight coupling!» State is argument to every routine! 24-43!

44 Top Down Problems? 2! Tight coupling!» State is argument to every routine! Means long and complicate control structure!» Case statements everywhere on state!! 24-44!

45 Top Down Problems? 3! Tight coupling!» State is argument to every routine! Means long and complicate control structure!» Case statements everywhere on state! Violates single choice principle!» Too many locations need to know about all states!! > Difficult to modify as states added or removed! 24-45!

46 Top Down Problems? 4! Tight coupling!» State is argument to every routine! Means long and complicate control structure!» Case statements everywhere on state! Violates single choice principle!» Too many locations need to know about all states! > difficult to modify as states added or removed! Not reusable/general except as a template!» implicit argument in all functions is the application!» Generality know about all states in all applications! 24-46!

47 OO Solution?! How do you use OO to solve the problem?! 24-47!

48 An OO Solution! Routines exchange too much data?! Put routines in your data! 24-48!

49 An OO Solution 2! Routines exchange too much data?! put routines in your data! Instead of building components around operations while distributing data!» OO does reverse! > build around data and distribute operations!! 24-49!

50 An OO Solution 3! Instead of building components around operations while distributing data!» OO does reverse! > build around data and distribute operations! Use most important data types as basis for modules!! Routines exchange too much data?! put routines in your data!» Routines are attached to data to which it relates most closely! 24-50!

51 An OO Solution 4! Routines exchange too much data?! put routines in your data! Instead of building components around operations while distributing data!» OO does reverse! > build around data and distribute operations! Use most important data types as basis for modules!» Routines are attached to data to which it relates most closely! In this application state should be a class! 24-51!

52 State as Class! What would be handed over to state?! 24-52!

53 State as Class 2! What would be handed over to state?!» All operations that characterize a state! >???! 24-53!

54 State as Class 3! What would be handed over to state?!» All operations that characterize a state! > Displaying screen! > Analyzing answer! > Checking answer! > Producing error messages! > Processing correct answer!» Customize for each state! 24-54!

55 Class State! *! STATE! input : ANSWER! choice : INTEGER! execute! correct : BOOLEAN! display*! read*! message*! process*! Deferred class! Deferred features! Execute is effective because we know its behaviour! execute! local ok : BOOLEAN! do! from not ok until ok loop! display ; read ; ok := correct! if not ok then message end! end! ensure ok! end! 24-55!

56 Inheritance & Implementation! STATE describes the general notion of state!» execute is the same for all states!» other routines must be customized! Use deferred classes to specify general situation and provide for extension! Use inheritance to specify particular states!» Implement deferred routines! *! STATE! INITIAL! RESERVATION! CONFIRMATION! 24-56!

57 Architecture of System! Separates elements common to all states and elements specific to individual states! Common elements do not need to be redeclared in descendants! 24-57!

58 Architecture of System 2! Satisfies open-closed principle!» STATE is closed!» Inheritance opens it! State is typical of behaviour classes!» Deferred classes capture common behaviour! Inheritance & Deferral are key for reusable components! 24-58!

59 Completing the System Design! How do we represent transitions and an actual application?! Have to take care of managing a session!» What execute_session did in top down! What is missing?!» The notion of the specific application! 24-59!

60 Application Class! Features!» execute! > how to execute the application!» initial & is_final! > special states properties of application!» transition! > mapping from state to state! May want to add more features!» Add new state or transition!» Store in a data base!»...! 24-60!

61 Application Class 2! class application feature! initial_state_number : INTEGER!!! execute! local state : STATE ; state_number : INTEGER! do! from st_number : initial_state_number! until st_number = 0! loop! state := associated_state.item ( state_number )! state.execute! state_number := transition.item (state.number, state.choice )! end!!!! More detail in next 4 slides!!! end! 24-61!

62 Transition Array! Number states from 1..P Choices are numbered from 1..Q! Represent transition as an P (states) x Q(choices) array transition!!!!transition : ARRAY2 [ INTEGER ] -- State numbers! Need support routines such as the following!!put_transistion ( in_state_number : INTEGER!! ; choice : INTEGER!! ; out_state_number : INTEGER )! 24-62!

63 Associated State!» Array associated_state gives the STATE associated with a state number!!!!associated_state : ARRAY [ STATE ]! Need support routines such as the following!!!!put_state ( state_number : INTEGER! ; state : STATE )!! 24-63!

64 Initial state! Attribute initial_state_number represents the starting state! Have a support routine to select the initial state!!!!set_initial_state (state_number : INTEGER )! 24-64!

65 Implementing the Design! Creation procedure of APPLICATION uses creation procedures of ARRAY and ARRAY2! see p691 & 692 of Meyer 1997 Building an application is relatively easy due separation of parts! 24-65!

66 Points to Think About! Forget about a main program! 24-66!

67 Points to Think About! Forget about a main program! Focus on data abstraction!» Leads to structures that can more easily change and are more easily reused! 24-67!

68 Points to Think About! Forget about a main program! Focus on data abstraction!» Leads to structures that can more easily change and are more easily reused! Don't ask!» What does the system do?! > It is not a function! 24-68!

69 Points to Think About 2! Don't worry too much about modelling the real world!» Goto version is a close model but poor design! 24-69!

70 Points to Think About 3! Heuristic to find the classes!» Look for data transmissions and concepts that appear in communication between numerous components of a system! 24-70!

71 Points to Think About 4! What counts in OO design is how good are your! abstractions for structuring your software.! 24-71!

72 Points to Think About 5! What counts in OO design is how good are your! abstractions for structuring your software.!! Above all else, worry about finding the! right abstractions! 24-72!

73 Points to Think About 6! What counts in OO design is how good are your! abstractions for structuring your software.!! Above all else, worry about finding the! right abstractions! Big win from OO!!clear, general, manageable, change-ready abstractions! 24-73!

Case Study Multi-Panel Interactive System

Case Study Multi-Panel Interactive System Case Study Multi-Panel Interactive System 24-1 The Problem Domain Build a general type of interactive system» Users interact with a set of panels > Web applications are an example Each session goes through

More information

COSC3311 Software Design

COSC3311 Software Design COSC3311 Software Design Polymorphism & the Multi-Panel design pattern Slides based on Object Oriented Software Construction 02/03/2005 2:08 PM 0 Multi-panel interactive systems Design 1 hard coded statechart

More information

The State Design Pattern

The State Design Pattern The State Design Pattern Readings: OOSC2 Chapter 20 EECS3311 A: Software Design Fall 2018 CHEN-WEI WANG Motivating Problem Consider the reservation panel of an online booking system: 2 of 28 State Transition

More information

(Refer Slide Time: 1:27)

(Refer Slide Time: 1:27) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 1 Introduction to Data Structures and Algorithms Welcome to data

More information

Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt

Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt www.introsoftwaretesting.com OO Software and Designs Emphasis on modularity and reuse puts complexity

More information

Design Patterns. Gunnar Gotshalks A4-1

Design Patterns. Gunnar Gotshalks A4-1 Design Patterns A4-1 On Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every problem

More information

Session 4b: Review of Program Quality

Session 4b: Review of Program Quality Session 4b: Review of Program Quality What makes one program "better" than another? COMP 170 -- Fall, 2013 Mr. Weisert What is a good program? Suppose we give the same assignment to two programmers (or

More information

Code Generation. Lecture 12

Code Generation. Lecture 12 Code Generation Lecture 12 1 Lecture Outline Topic 1: Basic Code Generation The MIPS assembly language A simple source language Stack-machine implementation of the simple language Topic 2: Code Generation

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #29 Arrays in C (Refer Slide Time: 00:08) This session will learn about arrays in C. Now, what is the word array

More information

UNIT III BALANCED SEARCH TREES AND INDEXING

UNIT III BALANCED SEARCH TREES AND INDEXING UNIT III BALANCED SEARCH TREES AND INDEXING OBJECTIVE The implementation of hash tables is frequently called hashing. Hashing is a technique used for performing insertions, deletions and finds in constant

More information

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees.

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. According to the 161 schedule, heaps were last week, hashing

More information

Design by Contract in Eiffel

Design by Contract in Eiffel Design by Contract in Eiffel 2002/04/15 ctchen@canthink.com.com.tw.tw Reference & Resource Bertrand Meyer, Object-Oriented Oriented Software Construction 2nd,, 1997, PH. Bertrand Meyer, Eiffel: The Language,,

More information

Chapter 7. - FORTRAN I control statements were based directly on IBM 704 hardware

Chapter 7. - FORTRAN I control statements were based directly on IBM 704 hardware Levels of Control Flow: 1. Within expressions 2. Among program units 3. Among program statements Evolution: - FORTRAN I control statements were based directly on IBM 704 hardware - Much research and argument

More information

Modularity!! Guidelines for design! in any programming language!

Modularity!! Guidelines for design! in any programming language! Modularity!! Guidelines for design! in any programming language! 14-1! Modular Software! Software constructed as assemblies of small pieces! 14-2! Modular Software 2! Software constructed as assemblies

More information

Data Structures Lesson 9

Data Structures Lesson 9 Data Structures Lesson 9 BSc in Computer Science University of New York, Tirana Assoc. Prof. Marenglen Biba 1-1 Chapter 21 A Priority Queue: The Binary Heap Priority Queue The priority queue is a fundamental

More information

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2) SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay Lecture #10 Process Modelling DFD, Function Decomp (Part 2) Let us continue with the data modeling topic. So far we have seen

More information

6.001 Notes: Section 17.5

6.001 Notes: Section 17.5 6.001 Notes: Section 17.5 Slide 17.5.1 Now, let's look at one example in which changing the evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how

More information

Module 16. Software Reuse. Version 2 CSE IIT, Kharagpur

Module 16. Software Reuse. Version 2 CSE IIT, Kharagpur Module 16 Software Reuse Lesson 39 Basic Ideas on Software Reuse Specific Instructional Objectives At the end of this lesson the student would be able to: Explain the advantages of software reuse. Identify

More information

Modularity Guidelines for design in any programming language

Modularity Guidelines for design in any programming language Modularity Guidelines for design in any programming language 14-1 Modular Software Software constructed as assemblies of small pieces» Each piece encompasses the data and operations necessary to do one

More information

Lecture 2 and 3: Fundamental Object-Oriented Concepts Kenneth M. Anderson

Lecture 2 and 3: Fundamental Object-Oriented Concepts Kenneth M. Anderson Lecture 2 and 3: Fundamental Object-Oriented Concepts Kenneth M. Anderson January 13, 2005 January 18, 2005 1 of 38 Lecture Goals Introduce the basic concepts of object-oriented analysis/design/programming

More information

4.1 Review - the DPLL procedure

4.1 Review - the DPLL procedure Applied Logic Lecture 4: Efficient SAT solving CS 4860 Spring 2009 Thursday, January 29, 2009 The main purpose of these notes is to help me organize the material that I used to teach today s lecture. They

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 43 Dynamic Binding (Polymorphism): Part III Welcome to Module

More information

Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur. Lecture 13 Path Testing

Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur. Lecture 13 Path Testing Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 13 Path Testing Welcome to this session and we will discuss about path

More information

MITOCW watch?v=zm5mw5nkzjg

MITOCW watch?v=zm5mw5nkzjg MITOCW watch?v=zm5mw5nkzjg The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

From Design Patterns: Elements of Reusable Object Oriented Software. Read the sections corresponding to patterns covered in the following slides.

From Design Patterns: Elements of Reusable Object Oriented Software. Read the sections corresponding to patterns covered in the following slides. From Design Patterns: Elements of Reusable Object Oriented Software Read the sections corresponding to patterns covered in the following slides. DESIGN PRINCIPLES Modularity Cohesion Coupling Separation

More information

UNIT II Requirements Analysis and Specification & Software Design

UNIT II Requirements Analysis and Specification & Software Design UNIT II Requirements Analysis and Specification & Software Design Requirements Analysis and Specification Many projects fail: because they start implementing the system: without determining whether they

More information

state encoding with fewer bits has fewer equations to implement state encoding with more bits (e.g., one-hot) has simpler equations

state encoding with fewer bits has fewer equations to implement state encoding with more bits (e.g., one-hot) has simpler equations State minimization fewer states require fewer state bits fewer bits require fewer logic equations Encodings: state, inputs, outputs state encoding with fewer bits has fewer equations to implement however,

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi. Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data

More information

The Software Design Process. CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed

The Software Design Process. CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed The Software Design Process CSCE 315 Programming Studio, Fall 2017 Tanzir Ahmed Outline Challenges in Design Design Concepts Heuristics Practices Challenges in Design A problem that can only be defined

More information

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout

Trusted Components. Reuse, Contracts and Patterns. Prof. Dr. Bertrand Meyer Dr. Karine Arnout 1 Last update: 2 November 2004 Trusted Components Reuse, Contracts and Patterns Prof. Dr. Bertrand Meyer Dr. Karine Arnout 2 Lecture 5: Design patterns Agenda for today 3 Overview Benefits of patterns

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

More Scripting Techniques Scripting Process Example Script

More Scripting Techniques Scripting Process Example Script More Scripting Techniques Scripting Process Example Script 1 arguments to scripts positional parameters input using read exit status test program, also known as [ if statements error messages 2 case statement

More information

Testing: Test design and testing process

Testing: Test design and testing process Testing: Test design and testing process Zoltán Micskei Based on István Majzik s slides Dept. of Measurement and Information Systems Budapest University of Technology and Economics Department of Measurement

More information

Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions)

Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions) Introduction Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions) In this project, you will write a compiler for a programming language called Rube, which is a small objectoriented programming

More information

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 Lezione 9 OO modeling Design Patterns Structural Patterns Behavioural Patterns

More information

CS450 - Structure of Higher Level Languages

CS450 - Structure of Higher Level Languages Spring 2018 Streams February 24, 2018 Introduction Streams are abstract sequences. They are potentially infinite we will see that their most interesting and powerful uses come in handling infinite sequences.

More information

Programming II (CS300)

Programming II (CS300) 1 Programming II (CS300) Chapter 01: Procedural Programming MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Procedural Programming 2 Introduction Procedural Programming: General Overview Procedural Programming:

More information

Further MPI Programming. Paul Burton April 2015

Further MPI Programming. Paul Burton April 2015 Further MPI Programming Paul Burton April 2015 Blocking v Non-blocking communication Blocking communication - Call to MPI sending routine does not return until the send buffer (array) is safe to use again

More information

Lecture 3 (02/06, 02/08): Condition Statements Decision, Operations & Information Technologies Robert H. Smith School of Business Spring, 2017

Lecture 3 (02/06, 02/08): Condition Statements Decision, Operations & Information Technologies Robert H. Smith School of Business Spring, 2017 Lecture 3 (02/06, 02/08): Condition Statements Decision, Operations & Information Technologies Robert H. Smith School of Business Spring, 2017 K. Zhang BMGT 404 The modulus operator It works on integers

More information

9 Working with the Java Class Library

9 Working with the Java Class Library 9 Working with the Java Class Library 1 Objectives At the end of the lesson, the student should be able to: Explain object-oriented programming and some of its concepts Differentiate between classes and

More information

Control Structures. Outline. In Text: Chapter 8. Control structures Selection. Iteration. Gotos Guarded statements. One-way Two-way Multi-way

Control Structures. Outline. In Text: Chapter 8. Control structures Selection. Iteration. Gotos Guarded statements. One-way Two-way Multi-way Control Structures In Text: Chapter 8 1 Control structures Selection One-way Two-way Multi-way Iteration Counter-controlled Logically-controlled Gotos Guarded statements Outline Chapter 8: Control Structures

More information

The Bizarre Truth! Automating the Automation. Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER

The Bizarre Truth! Automating the Automation. Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER The Bizarre Truth! Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER By Kimmo Nupponen 1 TABLE OF CONTENTS 1. The context Introduction 2. The approach Know the difference

More information

Embedded Systems Design Prof. Anupam Basu Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Embedded Systems Design Prof. Anupam Basu Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Embedded Systems Design Prof. Anupam Basu Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 05 Optimization Issues Now I see, that is not been seen there;

More information

Arrays and Other Data Types

Arrays and Other Data Types 241 Chapter 14 Arrays and Other Data Types 14.1 Array Data Types 14.2 Manipulating Lists 14.3 When to Use an Array 14.4 Initialization of Arrays 14.5 Sorting an Array 14.6 Related Lists 14.7 Subrange Data

More information

(Refer Slide Time: 06:01)

(Refer Slide Time: 06:01) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 28 Applications of DFS Today we are going to be talking about

More information

CHAPTER 5 GENERAL OOP CONCEPTS

CHAPTER 5 GENERAL OOP CONCEPTS CHAPTER 5 GENERAL OOP CONCEPTS EVOLUTION OF SOFTWARE A PROGRAMMING LANGUAGE SHOULD SERVE 2 RELATED PURPOSES : 1. It should provide a vehicle for programmer to specify actions to be executed. 2. It should

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

Problem Solving & Heuristic Search

Problem Solving & Heuristic Search 190.08 Artificial 2016-Spring Problem Solving & Heuristic Search Byoung-Tak Zhang School of Computer Science and Engineering Seoul National University 190.08 Artificial (2016-Spring) http://www.cs.duke.edu/courses/fall08/cps270/

More information

6.034 Notes: Section 2.1

6.034 Notes: Section 2.1 6.034 Notes: Section 2.1 Slide 2.1.1 Search plays a key role in many parts of AI. These algorithms provide the conceptual backbone of almost every approach to the systematic exploration of alternatives.

More information

Heuristics and Algorithms

Heuristics and Algorithms A * Algorithm A * algorithm A* is a type of search algorithm. Some problems can be solved by representing the world in the initial state, and then for each action we can perform on the world we generate

More information

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto Recommed Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto DISCLAIMER: The information contained in this document does NOT contain

More information

Classes The Static Structure

Classes The Static Structure Classes The Static Structure Abstract data types equipped with a possibly partial implementation 04-1 Style Rules Read page 180 Pick a style and stick to it Recommend that you use Eiffel style or close

More information

Introduction 2 The first synchronous language (early 80 s) Gérard Berry and his team (École des Mines de Paris / INRIA Sophia-Antipolis) Imperative, s

Introduction 2 The first synchronous language (early 80 s) Gérard Berry and his team (École des Mines de Paris / INRIA Sophia-Antipolis) Imperative, s Pascal Raymond, Verimag-CNRS Introduction 2 The first synchronous language (early 80 s) Gérard Berry and his team (École des Mines de Paris / INRIA Sophia-Antipolis) Imperative, sequential style (i.e.

More information

The Esterel language

The Esterel language Pascal Raymond, Verimag-CNRS Introduction 2 The first synchronous language (early 80 s) Gérard Berry and his team (École des Mines de Paris / INRIA Sophia-Antipolis) Imperative, sequential style (i.e.

More information

Controlling Macro Flow

Controlling Macro Flow 30 Controlling Macro Flow Control Statement Overview, 30-2 IF, ELSEIF, ELSE,, 30-2 DO,, 30-3 WHILE, ENDWHILE, 30-4 NEXT, 30-5 BREAK, 30-5 GOTO, MLABEL, 30-6 Invoking Macros from Within Macros, 30-7 CALL,

More information

Treewidth and graph minors

Treewidth and graph minors Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under

More information

Data Structures using OOP C++ Lecture 3

Data Structures using OOP C++ Lecture 3 References: th 1. E Balagurusamy, Object Oriented Programming with C++, 4 edition, McGraw-Hill 2008. 2. Robert L. Kruse and Alexander J. Ryba, Data Structures and Program Design in C++, Prentice-Hall 2000.

More information

Simple Factory Pattern

Simple Factory Pattern Simple Factory Pattern Graeme Geldenhuys 2008-08-02 In this article I am going to discuss one of three Factory design patterns. The Factory patterns are actually subtle variations of each other and all

More information

LSMW (Legacy System Migration Workbench) Published by Team of SAP Consultants at SAPTOPJOBS Visit us at.

LSMW (Legacy System Migration Workbench) Published by Team of SAP Consultants at SAPTOPJOBS Visit us at. LSMW (Legacy System Migration Workbench) Published by Team of SAP Consultants at SAPTOPJOBS Visit us at Copyright 2007-09@SAPTOPJOBS All rights reserved. No part of this publication may be reproduced,

More information

Classes! The Static Structure!

Classes! The Static Structure! Classes The Static Structure Abstract data types equipped with a possibly partial implementation 04-1 Style Rules Pick a style and stick to it Recommend that you use Eiffel style or close approximation»

More information

Programming Language Pragmatics

Programming Language Pragmatics Chapter 10 :: Functional Languages Programming Language Pragmatics Michael L. Scott Historical Origins The imperative and functional models grew out of work undertaken Alan Turing, Alonzo Church, Stephen

More information

UNIT 1-2 MARKS QUESTIONS WITH ANSWERS

UNIT 1-2 MARKS QUESTIONS WITH ANSWERS SUBJECT: SOFTWARE TESTING METHODOLOGIES. UNIT 1-2 MARKS QUESTIONS WITH ANSWERS 1) What is testing? What is the purpose of testing? A) TESTING: After the programs have been developed they must be tested

More information

17.11 Bean Rules persistent

17.11 Bean Rules persistent 17.10 Java Beans Java beans are a framework for creating components in Java. AWT and Swing packages are built within this framework Made to fit in with graphic development environments such as Jbuilder

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 2 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3)

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3) Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.) Some slides adapted from Richard Lathrop, USC/ISI, CS 7 Review: The Minimax Rule Idea: Make the best move for MAX assuming that MIN always replies

More information

A practicalintroduction to embedded programming. Brian Plancher 10/17/2018

A practicalintroduction to embedded programming. Brian Plancher 10/17/2018 A practicalintroduction to embedded programming Brian Plancher Brian_Plancher@g.harvard.edu 10/17/2018 This week s task is simple: 1. Since the boards you made 2 weeks ago are perfect and are still in

More information

Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore

Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore Lecture 04 Software Test Automation: JUnit as an example

More information

Design Pattern Detection

Design Pattern Detection Design Pattern Detection Design Patterns EECS 6431 Design Pattern Detection 2/22 A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution

More information

Design Patterns: State, Bridge, Visitor

Design Patterns: State, Bridge, Visitor Design Patterns: State, Bridge, Visitor State We ve been talking about bad uses of case statements in programs. What is one example? Another way in which case statements are sometimes used is to implement

More information

Chapter 8. Statement-Level Control Structures

Chapter 8. Statement-Level Control Structures Chapter 8 Statement-Level Control Structures Levels of Control Flow Within expressions Among program units Among program statements Copyright 2012 Addison-Wesley. All rights reserved. 1-2 Control Structure

More information

Instructor: Craig Duckett. Lecture 14: Tuesday, May 15 th, 2018 Stored Procedures (SQL Server) and MySQL

Instructor: Craig Duckett. Lecture 14: Tuesday, May 15 th, 2018 Stored Procedures (SQL Server) and MySQL Instructor: Craig Duckett Lecture 14: Tuesday, May 15 th, 2018 Stored Procedures (SQL Server) and MySQL 1 Assignment 3 is due LECTURE 20, Tuesday, June 5 th Database Presentation is due LECTURE 20, Tuesday,

More information

Functions. Arash Rafiey. September 26, 2017

Functions. Arash Rafiey. September 26, 2017 September 26, 2017 are the basic building blocks of a C program. are the basic building blocks of a C program. A function can be defined as a set of instructions to perform a specific task. are the basic

More information

Virtual Machine Where we are at: Part I: Stack Arithmetic. Motivation. Compilation models. direct compilation:... 2-tier compilation:

Virtual Machine Where we are at: Part I: Stack Arithmetic. Motivation. Compilation models. direct compilation:... 2-tier compilation: Where we are at: Virtual Machine Part I: Stack Arithmetic Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator

More information

Constraint Satisfaction Problems: A Deeper Look

Constraint Satisfaction Problems: A Deeper Look Constraint Satisfaction Problems: A Deeper Look The last problem set covered the topic of constraint satisfaction problems. CSP search and solution algorithms are directly applicable to a number of AI

More information

bash Tests and Looping Administrative Shell Scripting COMP2101 Fall 2017

bash Tests and Looping Administrative Shell Scripting COMP2101 Fall 2017 bash Tests and Looping Administrative Shell Scripting COMP2101 Fall 2017 Command Lists A command is a sequence of commands separated by the operators ; & && and ; is used to simply execute commands in

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Object-Oriented Software Construction

Object-Oriented Software Construction 1 Object-Oriented Software Construction Bertrand Meyer Reading assignment 2 OOSC2 Chapter 10: Genericity 3 Lecture 4: Abstract Data Types Abstract Data Types (ADT 4 Why use the objects? The need for data

More information

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013! Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are

More information

Data paths and control logic

Data paths and control logic Data paths and control logic! Building larger digital systems " Include data, not just control inputs! An example! Building up toward project - MasterMind Autumn 2014 CSE390C - IX - Data Paths and Control

More information

Programming Principles 1 (CSC131) & 2 (CSC132) Software usage guide

Programming Principles 1 (CSC131) & 2 (CSC132) Software usage guide School of Sciences Department of Computer Science and Engineering Programming Principles 1 (CSC131) & 2 (CSC132) Software usage guide WHAT SOFTWARE AM I GOING TO NEED/USE?... 3 WHERE DO I FIND THE SOFTWARE?...

More information

A Reconnaissance on Design Patterns

A Reconnaissance on Design Patterns A Reconnaissance on Design Patterns M.Chaithanya Varma Student of computer science engineering, Sree Vidhyanikethan Engineering college, Tirupati, India ABSTRACT: In past decade, design patterns have been

More information

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology

Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology exam Compiler Construction in4303 April 9, 2010 14.00-15.30 This exam (6 pages) consists of 52 True/False

More information

Requirements w/rapid Prototyping Use case Analysis

Requirements w/rapid Prototyping Use case Analysis Requirements w/rapid Prototyping Use case Analysis 1. What are Use cases? 2. A Use case Example 3. Where are they used? 4. Use case FAQ. 5. Relationship to next lecture. Typeset by FoilTEX c, P. Devanbu

More information

MORE OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 4 09/01/2011

MORE OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 4 09/01/2011 MORE OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 4 09/01/2011 1 Goals of the Lecture Continue a review of fundamental object-oriented concepts 2 Overview of OO Fundamentals

More information

SYMFONY2 WEB FRAMEWORK

SYMFONY2 WEB FRAMEWORK 1 5828 Foundations of Software Engineering Spring 2012 SYMFONY2 WEB FRAMEWORK By Mazin Hakeem Khaled Alanezi 2 Agenda Introduction What is a Framework? Why Use a Framework? What is Symfony2? Symfony2 from

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore

Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore Combinatorics Prof. Dr. L. Sunil Chandran Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 5 Elementary concepts and basic counting principles So, welcome

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #44. Multidimensional Array and pointers

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #44. Multidimensional Array and pointers Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #44 Multidimensional Array and pointers In this video, we will look at the relation between Multi-dimensional

More information

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 10A Lecture - 20 What is a function?

More information

Design Pattern Detection

Design Pattern Detection Design Pattern Detection Design Patterns A design pattern systematically names, explains and evaluates an important and recurring design problem and its solution Good designers know not to solve every

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 20 Intermediate code generation Part-4 Run-time environments

More information

Information Security II Prof. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras

Information Security II Prof. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras Information Security II Prof. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 30 Task Switch recap - Week 6 (Refer Slide Time: 00:09) So welcome back

More information

Ch. 7: Control Structures

Ch. 7: Control Structures Ch. 7: Control Structures I. Introduction A. Flow of control can be at multiple levels: within expressions, among statements (discussed here), and among units. B. Computation in imperative languages uses

More information

Patterns and Testing

Patterns and Testing and Lecture # 7 Department of Computer Science and Technology University of Bedfordshire Written by David Goodwin, based on the lectures of Marc Conrad and Dayou Li and on the book Applying UML and (3

More information

Copyright 2013 Thomas W. Doeppner. IX 1

Copyright 2013 Thomas W. Doeppner. IX 1 Copyright 2013 Thomas W. Doeppner. IX 1 If we have only one thread, then, no matter how many processors we have, we can do only one thing at a time. Thus multiple threads allow us to multiplex the handling

More information

MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 MITOCW watch?v=flgjisf3l78 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

Why Design by Contract! CS 619 Introduction to OO Design and Development. Design by Contract. Fall 2012

Why Design by Contract! CS 619 Introduction to OO Design and Development. Design by Contract. Fall 2012 Why Design by Contract What s the difference with Testing? CS 619 Introduction to OO Design and Development Design by Contract Fall 2012 Testing tries to diagnose (and cure) defects after the facts. Design

More information

COP5621 Exam 4 - Spring 2005

COP5621 Exam 4 - Spring 2005 COP5621 Exam 4 - Spring 2005 Name: (Please print) Put the answers on these sheets. Use additional sheets when necessary. Show how you derived your answer when applicable (this is required for full credit

More information

Compiler construction

Compiler construction Compiler construction Martin Steffen March 13, 2017 Contents 1 Abstract 1 1.1 Symbol tables. 1 1.1.1 Introduction 1 1.1.2 Symbol table design and interface.. 2 1.1.3 Implementing symbol tables 3 1.1.4

More information