#in-class Take a look at A3 assignment description Respond to the poll on #in-class Post questions you have about A3 on #in-class, or emoji a question.

Slides:



Advertisements
Similar presentations
INTRODUCTION COMPUTATIONAL MODELS. 2 What is Computer Science Sciences deal with building and studying models of real world objects /systems. What is.
Advertisements

Unified Modeling Language 7/12/2015B.Ramamurthy1 The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and Jim Rumbaugh.
Lecture 7: UML Class Diagrams CSE 111 7/15/20151Copyright W. Howden.
Blaha and Rumbaugh Sections 7.2 and 8.2
C# Event Processing Model Solving The Mystery. Agenda Introduction C# Event Processing Macro View Required Components Role of Each Component How To Create.
Object-oriented Design CSCI 5801: Software Engineering.
Chapter 6 – Architectural Design CSE-411, Dr. Shamim H Ripon.
1 Chapter Eleven Handling Events. 2 Objectives Learn about delegates How to create composed delegates How to handle events How to use the built-in EventHandler.
Introduction to Sequential Logic Design Finite State-Machine Design.
Model View Controller MVC Web Software Architecture.
CS-1020 Dr. Mark L. Hornick 1 Event-Driven Programming.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 6: Restaurant.
Elaboration: Iteration 2. Elaboration: Iteration 2 Basics Iteration 1 ends with : All the software has been tested: The idea in the UP is to do early,
6. Application Server Issues for the Project
Windows Communication Foundation and Web Services
Elaboration popo.
Architecture Brief Pepper
CHAPTER
Information Systems in Organizations 2
Computing with C# and the .NET Framework
Unified Modeling Language
A First Look at GUI Applications Radio Buttons and Check Boxes
Chapter 21 More About Tests.
Information Systems in Organizations 2
Chapter Eleven Handling Events.
Variables Data Types and Assignment
Design and Implementation
A4 Redux SENG 301.
Auburn University COMP 2710 Software Construction Use Case Analysis and Exercises (Part 2) Dr. Xiao Qin Auburn University.
Object Oriented Concepts
UML dynamic Modeling (Behavior Diagram)
Unified Modeling Language
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
Sequence Diagrams.
Information Systems in Organizations 2
Information Systems in Organizations 2
What is an Architecture?
C# Event Processing Model
Lesson 8: Boolean Expressions and "if" Statements
Communication Studies One
Figure 30.2 Layers in NextGen
Sequence Diagrams Lecture 6.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Information Systems in Organizations 2
Guidelines for Group Projects and Papers
Information Systems in Organizations 2
Communicators iCAN personal goals Milepost 2 Milepost 3.
Software Design Lecture : 15.
Unified Modeling Language
Information Systems in Organizations 2
Chapter 7 –Implementation Issues
Using Use Case Diagrams
GoF Design Patterns (Ch. 26)
Information Systems in Organizations 2
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
#in-class Take a look at the A2 assignment description Respond to the poll on #in-class Post questions you have about A2 on #in-class, or emoji a question.
What is an Architecture?
Variables Data Types and Assignment
Week 6, Class 2: Observer Pattern
Applying Use Cases (Chapters 25,26)
Information Systems in Organizations 2
Use Case Analysis – continued
Variables Data Types and Assignment
How do we revise? Flashcards Retrieval Practice Transform It
A4 Pre.
Information Systems in Organizations 2
Object Oriented System Design Responsibilities
Discover Your Employability Skills
Presentation transcript:

#in-class Take a look at A3 assignment description Respond to the poll on #in-class Post questions you have about A3 on #in-class, or emoji a question you like

A2 Post-Mortem SENG 301

A2: Notes on grading Grades should be in by Monday of next week I’ve posted a solution to A2 on the #A2 channel -- it includes the test scripts that your code will be graded against

A2: Learning Objectives Learn how to think about and use Events and EventHandlers as a mechanism for inter-component communication Overcome (again) the fear of opening up a massive code base Develop UML diagrams based on code that you know

A2: How does the A2 solution work Each time a VendingMachine is created, it creates an instance of a Logic class  new VendingMachineLogic(vm); The Logic class really only does three things: listens for when a customer puts in money; listens for when someone presses a button, and calculates how much change should be dispensed.

A2 Solution Functionality Listens for when a customer puts in money vm.CoinSlot.CoinAccepted += new EventHandler<CoinEventArgs>(CoinSlot_CoinAccepted); void CoinSlot_CoinAccepted(object sender, CoinEventArgs e) { this.availableFunds += e.Coin.Value; }

A2 Solution Functionality (cont.) 2) Listens for when someone presses a button Registers for the ButtonPressed event from each of the selection buttons in that vending machine Uses sender parameter to figure out which SelectionButton was pressed Determines the cost of the corresponding pop, and determines whether there’s enough credit in the machine to dispense the pop

A2: What’s the point? In large systems, components talk to one another in a lot of different ways: Explicit function calls on other objects POS calls Kitchen.OrderFood(order) Manipulating properties on other objects Kitchen.Open = false Sending messages over a wire (e.g. internet) new HttpRequest(”http://google.com”) Events and EventHandling Kitchen.FoodDone += new EventHandler(kitchen_FoodDone);

A2: What’s the point? (cont.) Many architectures publish tons of events; usually for most of the code you will write, you only need to listen/subscribe to a small subset of these The tricky thing is figuring out _which_ events are meaningful This is where UML diagrams come in handy: they provide a concrete visualization of how the different components are associated with one another

A2: Even “Chicken Scratches” are great..

A2: Some Remarks It is possible to complete A2 without using events, but generally, this required using more knowledge than you normally would have (i.e. the ScriptProcessor fires events into the VendingMachineFactory, and you can use this information to do the logic) Given how I promised grading would be done (i.e. black box), this is fine in terms of your grade HOWEVER, if you took this approach, I strongly urge you to take a careful look at A2, and see if you could re-create it in a “whiteroom” context (i.e. close the book and then try re-implementing it yourself). No honour lost if this is you!