1 / 77

CS 200 Additional Topics and Review

CS 200 Additional Topics and Review. Jim Williams, PhD. Week 14. Final Exam: Conflict Alternatives Emailed Monday, December 17th, 2:45 – 4:45 pm, Location? BP2 Eliza due Thursday Team Lab: Object-Oriented Space Game TA Evaluation Hours Last Week & CS 300?

josee
Télécharger la présentation

CS 200 Additional Topics and Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 200 Additional Topics and Review Jim Williams, PhD

  2. Week 14 • Final Exam: Conflict Alternatives Emailed • Monday, December 17th, 2:45 – 4:45 pm, Location? • BP2 Eliza due Thursday • Team Lab: Object-Oriented Space Game • TA Evaluation • Hours Last Week & CS 300? • My office hours change: Wed. 9:00 to 10:30 • Lecture: UML, Additional Topics

  3. Lots of Jobs if you understand Programming Software Developer/Programmer/Software Engineer Testing/Quality Assurance Technical Support Technical Writing Business/Systems Analyst Software Architect Product Manager Project Manager Development Manager Technical Sales Marketing

  4. Analysis and Design Analysis: Describing the Problem Design: Describing a Solution

  5. UML Diagrams UML (Unified Modeling Language) • Many diagrams with lots of details Goal in CS 200 is to recognize: • Use Case Diagram • Class Diagram • Object Diagram • Activity Diagram/Control Flow

  6. UML Diagrams: References Examples of Diagrams: https://www.uml-diagrams.org/ Simple Drawing Tool: http://www.umlet.com/umletino/umletino.html

  7. Use Case • Behavior diagram • How external users (actors) interact with the system. https://www.uml-diagrams.org/use-case-diagrams.html

  8. Class Diagram Shows structure of a system with features, constraints and relationships. Independent of time. https://www.uml-diagrams.org/class-diagrams-overview.html

  9. Object Diagram • A snapshot of a system at a point in time. • Instances of classes with specific attribute values. https://www.uml-diagrams.org/class-diagrams-overview.html

  10. Activity Diagram (Control Flow) • Behavior diagram • Shows flow of control emphasizing sequence and conditions https://www.uml-diagrams.org/activity-diagrams.html

  11. What Kind of Diagram is this?

  12. What Kind of Diagram is this?

  13. What Kind of Diagram is this?

  14. What Kind of Diagram is this?

  15. Space Game Apply UML

  16. Today Next Week: Review on Tuesday, last lecture TA Final Exam Review: @1461 Course Evaluations: aefis Lecture: Recursion, Survey, Inheritance

  17. Recursive Algorithm • Repeated applications of an algorithm on smaller versions of the same problem. • Eventually reach a base case which is simply solved.

  18. Recall Fibonacci Sequence 1 1 2 3 5 8 13 21 … First 2: 1, 1 (base case) Following numbers: sum of previous 2 Example: If we want to find the 5th number: 5th = 4th + 3rd (recursive step) https://en.wikipedia.org/wiki/Fibonacci_number

  19. Recursive Solution Base case: • Can be simply solved Recursive step: • Break into smaller problems

  20. Iterative solution

  21. Iteration vs Recursion • Each may be better (simpler, clearer, more efficient) for a problem. • Some problems, such as navigating trees, recursion is frequently a helpful and elegant solution.

  22. Application: What does this do? public class Show { public static void show(File file, String depth) { System.out.printf("%s%s\n", depth, file.getName()); if ( file.isDirectory()) { File[] files = file.listFiles(); for (int i = 0; i < files.length; i++) { show(files[i], depth + " "); } } } public static void main(String[] args) { File file = new File("."); show(file, " "); } }

  23. How does recursion end?

  24. Recent Course Improvements Redesign of Intro Course (CS302 -> CS200)Study CycleProblem Solving Tips Team Labs as study groups • emphasize reading Java, unexpected behavior Projects • emphasize incremental development & testing Increased assistants and office hours

  25. Recent Results Solid preparation for CS300 (our top goal) 25% decrease in DFDrop rate from 4+ years ago Fall 2017 • No DF Drop bias for gender, 1st gen • No grade bias based on experience

  26. Changes Possible • Computer Science is influencing every field, including education. • This potential seems exciting but not clear if what ways education will be positively influenced.

  27. Course Survey What would you expect in order to rate course in the top rating (7) of each category? • Lecture, Homework, Projects, Materials, Feedback • Instructor: Overall, Responsiveness, Environment • Recommend Course Please! describe in the open ended notes.

  28. Course Evaluations

  29. Inheritance & Polymorphism Animal Demo

  30. is-a vs has-a Relationships • is-a: inheritance class Dog extends Animal { } • has-a: composition class Car { Engine engine; Wheel [] wheels; }

  31. The 2nd toString method is ________ public class Cup { private String owner; public String toString() { return this.owner; } public String toString(String type) { return type; } }

  32. Course Review Key Principles, Tools, Diagrams, Data Types, Operators, Keywords, Control Flow, Programming Paradigms, Debugging Techniques, File Input/Output, Commenting & Style, Unit Testing, Memory, Best Practices, Learning Programming

  33. Tools zyBooks, JavaVisualizer, DiffChecker, Command Prompt, notepad, javac, java, Eclipse IDE (editor, compiler, vm, debugger)

  34. Diagrams truth tables, memory model diagrams, control flow charts (activity diagrams), class diagrams, object diagrams, and use-case diagrams.

  35. Data Types Primitive & Reference Primitive: 8 Reference: existing, classes you write.

  36. Operators

  37. Evaluating Java Expressions Precedence Associativity Sub-expressions left-to-right

  38. Key Principles Algorithms Abstraction

  39. Control Flow Sequence Methods Conditionals Loops

  40. Data Structures Arrays: single and multi-dimensional ArrayLists ArrayLists of Arrays

  41. Development Process Edit-Compile-Run cycle Analysis - understand the problem Design - pseudocode

  42. Best Practices • Incremental, systematic, frequent deliverables • Test frequently • Test bench with testing methods

  43. Debugging Techniques • Stepping through in Java Visualizer • print statements to verify and narrow down problem • print statements with DEBUG flag • Eclipse debugger

  44. Programming Paradigms Structured Programming Object-Oriented Programming (brief)

  45. Program Commenting & Style

  46. Learning to Program • Read and Write code • Lots of interrelated concepts that build on each other. • High level educational skills on Bloom's taxonomy https://www.teachthought.com/learning/what-is-blooms-taxonomy-a-definition-for-teachers/

  47. Applied Study Cycle • frequent, varied interactions with material

  48. zyBooks Participation Activities Assigned readings with small activities due before lecture

  49. Lecture - Activities • Definitions & Explanations • Drawing Diagrams • Demonstration • Stories • Retrieval Practice • Questions, including TopHat

  50. zyBooks Challenge Activities Application of previous week's material to small programs.

More Related