Week 7, Day 3 Half-Exam 2 A New Pattern SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.

Slides:



Advertisements
Similar presentations
SE2811 Week 8 Monday (last drop day) The Command Pattern Lambda Expressions SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr.
Advertisements

SE2811 Week 7, Class 2 The Gang of Four and more … Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder.
Week 8, Class 3: Model-View-Controller Model-View-Controller Why? What? How? Example: Barnyard Simon for the Web Question: Where should we use the command.
Week 5, Day 3: Observer Today Reducing coupling with the Observer The Observer pattern in Java APIs Posting events to a UI worker thread SE-2811 Slide.
SE-1021 Software Engineering II Week 5, Class SE-2811 Dr. Josiah Yoder Slide style: Dr. Hornick 1.
SE2811 Week 7, Class 1 Composite Pattern Applications Conceptual form Class structure Coding Example Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark.
CS2910 Week 1, Class 3 Today Lab 1 – Additional Assignment Working Ahead Primitives in Java SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder.
SE1011 Week 2, Class 3 Today Compiling and running Another example using Scanner Compile-time and Run-time errors Review for exam SE-1011 Slide design:
CS2852 Week 2, Class 1 Today Generics (Section 051) Big-O runtime analysis Muddiest Point Lab Quiz Includes writing a method from ArrayList class (See.
SE-1021 Software Engineering II Week 8, Class 1 Return Exam Producing UML diagrams automatically in EA Poll Everywhere Files Tomorrow Week 6 HW due (if.
SE-1021 Software Engineering II Week 5, Class 2 Why my computer crashed Layouts Multiple action listeners Single actionPerformed method – distinguishing.
Week 2, Day 2: The Factory Method Pattern Other good design principles Cohesion vs. Coupling Implementing the Strategy Pattern Changing strategies (behaviors)
SE-1021 Software Engineering II Week 5, Class 1 Learning Resources From inner classes to anonymous Inner Classes Additional GUI components Inheritance.
Week 6, Class 1 & 2: Decorators Return Exam Questions about lab due tomorrow in class? Threads Locking on null object invokeLater & the squares example.
CS2910 Week 1, Class 2 Today Announce Prof. Michael Vieau’s S-341 6p Thurs Wk 2 Assignment for tomorrow Data Encoding, Part 1 Parsing Data Muddiest Point.
CS2910 Week 1, Class 1 Today Introductions Class/Lab Layout Safety Review - Note about Lab Safety Review Announce Prof. Michael Vieau’s S-341 6p Thurs.
CS-2852 Data Structures Week 5, Class 1 – Testing and Stacks Return Exams & Labs  Package-level access  UML connectors for instance variables Announcement:
CS-2852 Data Structures Week 5, Class 2 – Testing and Stacks Announcement: Lab Demos - 2/3 & 4 on Friday Testing  Definitions, Example  (tentative) Testing.
Week 9, Class 3: Model-View-Controller Today Happens-Before Adapter and Façade Pattern (high-level) Tuesday: Project code due, 11pm Wednesday: Quiz Choose.
CS2852 Week 3, Class 2 Today Stacks Queues SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
CS2852 Week 6, Class 1 Today The run-time stack Writing and proving recursive methods SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
CS2852 Week 5, Class 2 Today Queue Applications Circular Queue Implementation Testing SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
SE1011 Week 3, Class 2 Today Sit down by someone you don't know Learn their name Find out who came farther to get to MSOE at the start of the quarter Designing.
CS2852 Week 7, Class 1 Today Binary Search Tree Implementing add Implementing find Return Quiz 4 (second attempt) Both sections are graded SE-2811 Slide.
Week 3, Day 3: Singleton Pattern Quiz Status Russia Opportunity Muddiest Points – Patterns SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick.
SE-1021 Software Engineering II Week 9, Class 1 ByteBuffer Tomorrow Get quizzes back from last week… Wednesday Quiz at start of lab 1.
Week 5, Day 3: Decorator Decorators Muddiest Point Tomorrow: Quiz on lab reading: web.msoe.edu/hasker/se2811/labs/5/ SE-2811 Slide design:
Week 5, Day 2: Decorator Decorators Muddiest Point Tomorrow: Quiz on lab reading: web.msoe.edu/hasker/se2811/labs/5/ SE-2811 Slide design:
CS2852 Week 2, Class 2 Today Big-O runtime analysis Linked Lists Muddiest Point Lab Quiz Includes writing a method from ArrayList class (See next slide)
Week 7, Class 1: The Command Pattern (cont.) Get Ready for Poll Everywhere Labs 2 & 3 returned Lab 7 due this evening at 11pm Quiz tomorrow at start of.
CS2910 Week 4, Class 2 Today Sit by someone you have not yet worked with this quarter. Learn his/her name if unknown. Turn on your laptop and start Wireshark.
Model-View-Controller A Design Pattern SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
Slide design: Dr. Mark L. Hornick
CS2910 Week 8, Class 2 Today Return Quiz Look at Schedule TCP implementation! Week 8, Monday Quiz on SMTP May include some questions requiring you to interpret.
Week 10, Day 3 Review for the quarter SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
The Command Pattern SE-2811 Dr. Mark L. Hornick 1.
CS2910 Week 7, Class 1 Today Capturing SMTP with Thunderbird Tomorrow Extra office hour at 11 am (right after lab) Friday Office hour cancelled SE-2811.
CS2910 Week 5, Class 1 Today Sit by someone you have not yet worked with Turn on your laptop and start Wireshark. DNS Next week Monday: Midterm Exam SE-2811.
Week 9, Day 1 Proxy SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
Week 6, Class 3: Composite Swing composites File composites Computer composites SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
Week 4, Day 1: Singleton(s?) Singleton leftover Why singletons? How to make lazy initialization work multi- threaded? Observers Why observers? Class structure.
Week 5, Class 3: Decorators Lab questions? Example: Starbuzz coffee Basic Pattern More examples Design Principles Compare with alternatives SE-2811 Slide.
CS2910 Week 6, Lab Today Dictionaries in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
SE2811 Week 8 – Class 2 Re: Lab due tonight SE-2811 Slide design: Dr. Mark L. Hornick Much Content: Dr. Hornick Most Errors: Dr. Yoder 1.
SE3910 Week 5, Class 3 Week 6, Class 2 (Wednesday) Quiz Week 7, Class 2 (Wednesday) Half-Exam 2 Analog and Digital Datarates SE-2811 Slide design: Dr.
SE3910 Week 8, Class 2 Week 4 Lab: Please return your graded Lab 4 to me so I can enter it in my gradebook Week 7, Class 2 (Wednesday) Half-Exam 2 Done.
CS-2852 Data Structures Week 5, Class 3 – Testing and Recursion Queue Implementing finite queues Binary Search Recursion Tomorrow – Quiz, Lab demos, Lab.
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Slide design: Dr. Mark L. Hornick
Week 2, Day 1: The Factory Method Pattern
Model-View-Controller
Week 6, Class 2: Observer Pattern
Week 7, Class 1: The Command Pattern (cont.)
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Week 6, Class 2: Observer Pattern
Slide design: Dr. Mark L. Hornick
Week 8, Class 3: Model-View-Controller
SE-1021 Software Engineering II
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
SE-1021 Software Engineering II
SE-1021 Software Engineering II
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1021 Software Engineering II
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Slide design: Dr. Mark L. Hornick
Presentation transcript:

Week 7, Day 3 Half-Exam 2 A New Pattern SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1

The Super Remote Control See demo program running, Car and Robot classes 1 min exercise: What coupling or cohesion challenges does this application face? 3 min exercise: Write a UML sketch of your solution Can any of our previous design patterns work? How would you modify them? SE-2811 Dr. Josiah Yoder 2

(Second design question?) SE-2811 Dr. Mark L. Hornick 3

SE-2811 Dr. Mark L. Hornick 4 Command Pattern Example

What is a command? It’s a function, treated as an object It has associated data This is known in Computer Science as a “closure” SE-2811 Dr. Mark L. Hornick 5

Inner Classes and Lambda Expressions Anonymous inner classes are quite useful for the command pattern A lambda expression is an anonymous inner class with simplified syntax What type the anon. inner class should have is determined from context A variety of syntaxes are available. SE-2811 Dr. Mark L. Hornick 6

Exercise Consider a MoveShapeCommand that moves a rectangle from one spot to another on the screen What data does this class need to store for undo? How about redo? SE-2811 Dr. Mark L. Hornick 7

SE-2811 Dr. Mark L. Hornick 8