# CSSE221: Software Dev. Honors Day 4 Pass in Runtime Assignment now to assistants Pass in Runtime Assignment now to assistants Announcements Announcements.

## Presentation on theme: "CSSE221: Software Dev. Honors Day 4 Pass in Runtime Assignment now to assistants Pass in Runtime Assignment now to assistants Announcements Announcements."— Presentation transcript:

CSSE221: Software Dev. Honors Day 4 Pass in Runtime Assignment now to assistants Pass in Runtime Assignment now to assistants Announcements Announcements Lab hours, including new afternoon hours, posted in Angel. Lab hours, including new afternoon hours, posted in Angel. I removed a question from HW2. I removed a question from HW2. HW1 returned now – questions? HW1 returned now – questions?

Answers to runtime assignment 1. A single for loop from 1 to n gives code that is O(n). 2. Sequential for loops, each running from 1 to n, are O(n) 3. Nested for loops, each running from 1 to n, are O(n 2 ) 4. Nested for loops in which f() is called once from within the inner loop and once outside the inner loop, but still inside the outer loop, are still O(n 2 ). 5. Adding an if statement to the body of f() doesn’t affect the asymptotic efficiency, so calling f() alone is O(1). When processing an array of size n... 1....if you just have to look at each entry individually: O(n) 2....if you have to look at each pair of entries individually: O(n 2 ) If you got any of these wrong, ask me now or a lab assistant before the end of the week (so you can learn and reinforce the right understanding before you do HW2) If you got any of these wrong, ask me now or a lab assistant before the end of the week (so you can learn and reinforce the right understanding before you do HW2)

Research study

Capsules – Group 1 (Section 1) Inheritance (Boutell) Polymorphism Bennington, Devore, Smith 1D and 2DArrays and ArrayLists Johnson, Sullivan GUI using Swing Fishman, Levey, Priest EventListeners Belton, Lundgren, Speyer Functors and Comparators Bennett, Skiles, Wentz Anonymous classes Crockett, McGinnis, Morrison

Capsules – Group 1 (Section 2) Inheritance Hein, Miller, Stokes Polymorphism Bennett, Clute, Reilly 1D and 2DArrays and ArrayLists Behling, Nibert GUI using Swing Eckert, Johnson, Richardson EventListeners Dovalovsky, Gates, Rubin Functors and Comparators Hulett, Kruth, Most Anonymous classes (Boutell)

Good quizzes… 1. Aren’t too long or too short (~5 minutes total) 2. Contain a mix of questions of easy and medium difficulties (appropriate to the topic) to test different levels of understanding. 3. Are consistent with the summary (I don’t want two people working independently on the quiz and the summary who never talk to each other) 4. Contain questions that are clearly worded and unambiguous 5. Include an answer key with correct answers 6. Have been proofread and are free of errors

Capsule Deliverables Email the quiz, key, and summary to me by 7:30 am on the day you are presenting. Email the quiz, key, and summary to me by 7:30 am on the day you are presenting. No.docx files, please No.docx files, please Bring to class printed versions: Bring to class printed versions: 1 copy of summary 1 copy of summary 2 copies of key 2 copies of key Enough copies of quiz for the class (20) Enough copies of quiz for the class (20) Stapled if more than 1 page. Stapled if more than 1 page.

This week: BigRational assignment Monday: Monday: API (Application Programming Interface) API (Application Programming Interface) Interfaces: writing to a contract Interfaces: writing to a contract Tuesday: Tuesday: Unit Testing: searching for logic errors Unit Testing: searching for logic errors Introduction to efficiency analysis: “big-Oh” Introduction to efficiency analysis: “big-Oh” Thursday: Thursday: Exceptions: throwing and catching Exceptions: throwing and catching

Any questions? Any questions? Course mechanics? Syllabus? Angel? Course mechanics? Syllabus? Angel? BigRational? BigRational? Big-oh? Big-oh? Unit Testing? Unit Testing?

Exceptions Used to handle unusual situations. Used to handle unusual situations. Vocabulary: throw, try, catch, finally, throws Vocabulary: throw, try, catch, finally, throws Football analogy Football analogy Hot-potato analogy Hot-potato analogy A piece of code will try to perform an operation. If something unusual happens, then the code will throw an exception. It is propagated through the methods that called it, via throws, until it is caught. Finally, some code will execute whether an exception was thrown or not. A piece of code will try to perform an operation. If something unusual happens, then the code will throw an exception. It is propagated through the methods that called it, via throws, until it is caught. Finally, some code will execute whether an exception was thrown or not. Go to Angel: Projects/Exceptions. Go to Angel: Projects/Exceptions. When you finish, you may work on BigRational. When you finish, you may work on BigRational.

Download ppt "CSSE221: Software Dev. Honors Day 4 Pass in Runtime Assignment now to assistants Pass in Runtime Assignment now to assistants Announcements Announcements."

Similar presentations