1 / 68

CS200 Course Improvements & UML Diagrams

This text discusses recent course improvements in CS200, including increased emphasis on reading Java and incremental development and testing. It also introduces UML diagrams - use case, class, object, and activity diagrams - and provides examples and references for each.

brandic
Download Presentation

CS200 Course Improvements & UML Diagrams

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 • Piazza: New CS Declaration Req. @1142 • BP2 • Team Lab: Object-Oriented Space Game • TA Evaluation • Hours Last Week & CS 300 • Course Evaluation (emailed link) • Lecture: UML, Additional Topics

  3. 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

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

  5. Brainstorm on Improving Course

  6. Course Survey • Lecture, Homework, Projects, Materials, Feedback • Instructor: Overall, Responsiveness, Environment • Recommend Course • Growth Questions (e.g., bring laptop to Team Lab). What would you expect in order to rate course in the top rating (7) of each category?Or why didn't you give a top rating? Please! describe in the open ended notes.

  7. Course Evaluations

  8. 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

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

  10. 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

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

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

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

  14. 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

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

  16. What Kind of Diagram is this?

  17. What Kind of Diagram is this?

  18. What Kind of Diagram is this?

  19. What Kind of Diagram is this?

  20. Problem With a command line program show the files in all subfolders of a folder.

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

  22. Recursion Example 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. Recall Fibonacci Sequence 1 1 2 3 5 8 13 21 … First 2: 1, 1 (base case) Others: sum of previous 2 (recursive step) Example: If we want to find the 5th number: 5th = 4th + 3rd https://en.wikipedia.org/wiki/Fibonacci_number

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

  25. Iterative solution

  26. 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.

  27. How does recursion end?

  28. 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

  29. Key Principles Algorithms Abstraction

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

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

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

  33. Operators

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

  35. Control Flow Sequence Methods Conditionals Loops

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

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

  38. Best Practices • Incremental, systematic, frequent deliverables • Test frequently • Test bench with testing methods • Add additional tests as requirements are determined or bugs are found.

  39. Debugging Techniques • Stepping through code • Java Visualizer • Eclipse debugger • Problem decomposition • Print statements, debugger • Tips

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

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

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

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

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

  45. Team Lab • Weekly paired and small group study with mentor nearby. • Required interaction with mentor on key topics. • Variety of activities to learn Terms, Read, Write, Test & Debug code.

  46. Weekly Programs • Application of programming concepts to design algorithms and write code to solve problems. • Small programs early, large programs with milestones later. • Incrementally developing skills on larger and more complex programs.

  47. Exams Assess careful reading and tracing skills.

  48. Memory areas static: holds static variables when class is loaded into memory. heap: where instances/objects are allocated stack: where local variables and parameters are allocated each time a method is called.

  49. Memory public class M { int varName = 1; static int cVar = 2; public M(int varName ) { this.varName = varName; } public static void main(String []args) { M[] varName = new M[3]; varName[0] = new M(3); varName[1] = new M(4); } }

More Related