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.

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

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.
CS2852 Week 8, Class 2 Today Tree terminology Non-Binary and Non-Search Trees Tree Traversals (Remaining slides not yet shown) Tomorrow: Quiz Implementing.
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.
SE2811 Week 7, Class 1 Composite Pattern Applications Conceptual form Class structure Coding Example Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark.
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 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.
Week 3, Day 2: Threads Questions about Threads “Multithreading” in Swing Lab tomorrow: Quiz Lab 3: Threading! SE-2811 Slide design: Dr. Mark L. Hornick.
CS2852 Week 3, Class 2 Today Stacks Queues SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
SE-1021 Software Engineering II Week 1, Day 2 Attendance Survey results: Use powerpoint Safety Review Preparation for Lab 1 More on Java fundamentals…
SE-1021 Software Engineering II Week 1, Day 2 Attendance Survey results: Use powerpoint Safety Review Preparation for Lab 1 More on Java fundamentals…
SE1011 Week 6, Class 1 Today Return Half Exam 2 (cont.) Object Oriented Programming (cont.) Muddiest Point Next Half Exam: Week 7, Monday SE-1011 Slide.
Editing Documents Lesson 2. Editing Involves: Adding Deleting Changing Moving Correct errors Refine the appearance of the document.
CS2910 Week 2, Class 1 Today Return Lab 1 Muddiest Points Quiz Parsing Data in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
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:
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 7, Day 3 Half-Exam 2 A New Pattern SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
CS2852 Week 6, Class 2 Today Class exercise: Implementing a recursive method Binary Search Trees Tomorrow: Quiz at start of lab Implementing a recursive.
CS2910 Week 4, Class 1 Today Encoding in Python – Review Quiz – Encoding in Python Introduction to HTTP SE-2811 Slide design: Dr. Mark L. Hornick Content:
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 3, Class 2 Today Big-O runtime analysis Linked Lists Muddiest Point Lab Quiz Includes writing a method from ArrayList class (See next slide)
CS2910 Week 7, Class 2 Today Quiz on encodings IMAP Encoding "Internet Messages" Tomorrow Office hour cancelled Monday Quiz on IMAP SE-2811 Slide design:
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.
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.
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.
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 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
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Week 2, Day 1: The Factory Method Pattern
Slide design: Dr. Mark L. Hornick
Guide To UNIX Using Linux Third Edition
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
SE-1021 Software Engineering II
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
SE-1021 Software Engineering II
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1
Polling vs. Interrupts CS2852 4/21/2019
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
11. MVC SE2811 Software Component Design
Slide design: Dr. Mark L. Hornick
Week 8, Class 3: Model-View-Controller
SE-1021 Software Engineering II
CS-2852 Data Structures Week 1, Class 1 Data Structures Syllabus
Slide design: Dr. Mark L. Hornick
11. MVC SE2811 Software Component Design
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1021 Software Engineering II
Slide design: Dr. Mark L. Hornick
SE-1021 Software Engineering II
Presentation transcript:

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 lab The Command Pattern Isolating Undo into the Invoker (wrapping up coding example) Why favor inheritance over composition? Coding example: Text editor Macros SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1

Alternatives to the Command Pattern SE-2811 Dr.Yoder 2

Why do we favor composition over inheritance? Inheritance Composition SE-2811 Dr.Yoder 3

SE-2811 Dr. Josiah Yoder 4

Text Editing [EXAMPLE] The Command Pattern’s Glory Days We will model our document as a String Insert events insert a string at an index Delete events delete N characters starting at an index E.g. Every time we type a letter, that inserts a letter into the string. When we delete, cut, or copy that removes or adds chunks of text out of the string. SE-2811 Dr.Yoder 5

Questions How to undo & redo inserting text? What state will you store in the insert command? What actions will you take to accomplish the undo? What actions will you take to accomplish the redo? (OPTIONAL) SE-2811 Dr.Yoder 6

SE-2811 Dr. Josiah Yoder 7

SE-2811 Dr. Josiah Yoder 8

SE-2811 Dr. Josiah Yoder 9

Undo multiple typed characters in a single block How will you detect if a character is typed? (Doesn’t have to be perfect for this example) How will you combine multiple “keystroke” commands into a single command? How will you implement undo? How will you implement redo? (OPTIONAL) SE-2811 Dr.Yoder 10

SE-2811 Dr. Josiah Yoder 11

SE-2811 Dr. Josiah Yoder 12

SE-2811 Dr. Josiah Yoder 13

SE-2811 Dr. Josiah Yoder 14

Command vs. Strategy Both achieve the open-closed design goal How about other goals? Strategy – only one reference at any given time Observer – many references (e.g. List ) Strategy – no state Observer – must have state? SE-2811 Dr.Yoder Ideas: 15