SE1011 Week 8, Class 2 Today Return Half Exam 3 (I have it with me) Object Oriented Programming Details Null references (as acting objects and arguments)

Slides:



Advertisements
Similar presentations
CS-1010 Dr. Mark L. Hornick 1 Selection Statements and conditional expressions.
Advertisements

Lecturer: Fintan Costello Welcome to Hdip 001 Introduction to Programming.
Final Exam Review Closed book Closed laptop One sheet of notes permitted SE-0010 Dr. Mark L. Hornick 1.
Week 3, Day 1: Processes & Threads Processes Threads SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
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:
Today Quiz Multithreading Options Qt socket buffers between threads Quiz today & Tuesday in lab SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr.
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.
SE-1010 Dr. Mark L. Hornick 1 Java Programming Basics.
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.
CS-1030 Dr. Mark L. Hornick 1 CS-1030 – Software Design 2 Dr. Mark L. Hornick web: people.msoe.edu/~hornick webCT: webct.msoe.edu.
CS2910 Week 2, Class 1 Today Data Encoding, Part 1 Parsing Data Python Muddiest Point Lab 2 – Bring text In Class, Thursday: Quiz Week 6, Monday: Midterm.
CS2852 Week 3, Class 2 Today Stacks Queues SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
CS2910 Week 5, Class 2 Today DNS Muddy Points More HTTP Headers Review for Midterm Exam This coming Monday: Midterm Exam SE-2811 Slide design: Dr. Mark.
SE1011 Week 8, Class 3 Today Designing Code SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder 1.
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.
SE1011 Week 6, Class 2 Today Return Half Exam 2 (cont.) Object Oriented Programming (cont.) UML class diagrams Muddiest Point Next Half Exam: Week 7, Monday.
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 6, Class 2 Today Return Half Exam 2 (cont.) Object Oriented Programming (cont.) UML class diagrams Muddiest Point Next Half Exam: Week 7, Monday.
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.
SE1011 Week 5, Class 1 Today More Java API tools Packages Object Oriented Programming Muddiest Point Tomorrow: Lab 5 – In-lab demo requirements now up.
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.
CE1901 Week 6, Class 3 Week 6 Mini-Exam Review Muddiest Point Timing Diagrams (See this slide and Outcomes on course webpage – link now available)Outcomes.
CS2852 Week 6, Class 2 Today Class exercise: Implementing a recursive method Binary Search Trees Tomorrow: Quiz at start of lab Implementing a recursive.
Today Return Quiz First true release of final project (Lab 8) Multithreading Options Qt socket buffers between threads SE-2811 Slide design: Dr. Mark L.
Week 5, Day 3: Decorator Decorators Muddiest Point Tomorrow: Quiz on lab reading: web.msoe.edu/hasker/se2811/labs/5/ SE-2811 Slide design:
Today Quiz not yet graded Final report requirements posted More on Multithreading Happens-Before in Java SE-2811 Slide design: Dr. Mark L. Hornick Content:
SE1011 Week 8, Class 1 Today Return Half Exam 3 (I have it with me) Object Oriented Programming Details References as arguments Overloaded methods Garbage.
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)
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.
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.
SE1011 Week 7, Class 3 Today Return Half Exam 3 (I have it with me) Object Oriented Programming Details References as arguments Overloaded methods Garbage.
SE1011 Week 9, Class 3 Today Arrays with Loops! Homework SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder 1.
UCAS How does it work ?. Radyr Sixth Form - UCAS Statistics  In % of students who applied ended up at university  In % of students who.
Week 6, Class 3: Composite Swing composites File composites Computer composites SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
CS2910 Week 6, Lab Today Dictionaries in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
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
SE-2811 Software Component Design
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
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
Slide design: Dr. Mark L. Hornick
Slide design: Dr. Mark L. Hornick
Week 8, Class 3: Model-View-Controller
Slide design: Dr. Mark L. Hornick
SE-1021 Software Engineering II
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Real Life Problems – Non-Calculator – Foundation – GCSE Questions
Circle – Circumference & Perimeter – Higher – GCSE Questions
Standard Form – Non-Calculator – Foundation – GCSE Questions
Scale Drawings – Foundation – GCSE Questions
Slide design: Dr. Mark L. Hornick
Using a Calculator – Foundation – GCSE Questions – AQA
Frequency Trees – Foundation – GCSE Questions – AQA
Tree Diagrams – Higher – GCSE Questions – AQA
SE-1021 Software Engineering II
These questions are the same format as previous GCSE exams.
Sector – Area – Higher – GCSE Questions – AQA
Prism – Volume – Higher – GCSE Questions – AQA
Sequences – Introduction – Foundation – GCSE Questions
Presentation transcript:

SE1011 Week 8, Class 2 Today Return Half Exam 3 (I have it with me) Object Oriented Programming Details Null references (as acting objects and arguments) Refactoring code Designing Code Muddiest Point SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder 1

“How-To Register” Info Session! Who: Anyone who wants to know how to register for classes for the Winter Quarter. What: A “How-To Register” Info Session with step- by-step instructions on how to register for classes. Registration for the winter quarter is coming up very shortly, and we want to make sure you feel prepared! When: You pick the day: Monday, November 2 nd, 1:00-1:50 p.m., or Friday, November 6 th, 12:00-12:50 p.m. Where: CC 53 2

Muddiest Point I understood most of today's concepts, but would like to go over static classes again really quickly just a refresher. [Coming up soon]static classes The origin of an xy plane falls into a pig pen. Now that's a muddy point.joke debuggingdebugger what does the memory diagram look like when you instantiate an object with null?null aren't they still equal if they're both null?null How to debug a program that requires user input.debugger 3 Discussed at start. Discussed during this class. [Instructor answer to the question]

Muddiest Point how to use this.this. & other. Does || work the same way as && as a short circuit operator? So if(true || ) will it go on or will it crash?|| short-circuit Not exactly a muddy point, but is there a sheet that has a bunch of useful hotkeys to use in intellij? (For example the ctrl + / for commenting out highlighted things) [Help->Default Keymap Reference]sheetintelliJ hotkeys how to use "this." & "other."this. & other. Should we have the comparator in the complex class? [Wait until Data Structures (CS2852)]Comparator 4 Discussed at start. Discussed during this class. [Instructor answer to the question]

NullPointerExceptions 5 main(…) Complex real double imag double real Complex ref r Complex ref n null Complex ref prod public … void main(…) { … Complex n = null; Complex r3 = new Complex(3); prod = n.multBy(r3); … }

NullPointerExceptions 6 main(…) Complex real double imag double real Complex ref this Complex(double real, double imag) Complex ref r Complex ref n null Complex ref other null Complex ref prod public … void main(…) { … Complex n = null; Complex r3 = new Complex(3); prod = r3.multBy(n); … } public Complex multBy(Complex other) { // HERE Complex result = new Complex(); result.real = this.real * other.real - this.imag * other.imag; result.imag = this.real * other.imag + this.imag * other.imag; return result; }

NullPointerExceptions 7 main(…) Complex real double imag double real Complex ref this Complex(double real, double imag) Complex ref r Complex ref n null Complex ref prod public … void main(…) { … Complex n = null; Complex r3 = new Complex(3); prod = r3.multBy(n); … } public Complex multBy(Complex other) { Complex result = new Complex(); // HERE result.real = this.real * other.real - this.imag * other.imag; result.imag = this.real * other.imag + this.imag * other.imag; return result; } Complex real double imag double Complex ref result Complex ref other null 0.0

SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder 8

Acknowledgement This course is based on the text Introduction to Programming with Java by Dean & Dean, 2 nd Edition SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder 9