big ideas in computer science
play

Big Ideas in Computer Science Divide, Conquer, & Glue CS111 - PDF document

Big Ideas in Computer Science Divide, Conquer, & Glue CS111 Wrap-Up Abstraction Modularity X - 1 X - 2 Divide, Conquer, & Glue Abstraction Suppose you have a problem P and you want its solution S Abstraction is a


  1. Big Ideas in Computer Science • Divide, Conquer, & Glue CS111 Wrap-Up • Abstraction • Modularity X - 1 X - 2 Divide, Conquer, & Glue Abstraction • Suppose you have a problem P and you want its solution S • Abstraction is a way of capturing common patterns • For example, once you learn how to drive, you can drive any car - P they all have common features such as steering, gas, and breaking. Once you learn these, you can use any car. Divide into subproblems • Of course, every car is different - they have different engines and P 1 P 2 P 3 P 4 breaking systems. But I don’t need to understand the details of the Conquer subproblems different engines to drive different cars (which is good, because I S 1 S 2 S 3 S 4 don’t have a clue!) Glue (combine) the • But I can drive, because I understand the interface (the breaks, the subproblems into solution gas, the steering) S X - 3 X - 4 Modularity A CS111 Retrospective • Modularity occurs when components are designed in a PS0: Web form standard manner such that they can be put together in a mix and match way – legos – computer peripherals – phone jacks – couches • If we have abstraction AND modularity, we can build bigger things out of smaller things (a very powerful idea) X - 5 X - 6

  2. A CS111 Retrospective A CS111 Retrospective PS1: Writing simple Java code, reading PS2: Writing methods, modularity, applets, local contracts, extending someone else’s code variables, expression and assignment statements X - 7 X - 8 A CS111 Retrospective A CS111 Retrospective PS3: More methods, methods with parameters, PS4: Conditionals, good programming style, methods which return values, abstraction objects and classes X - 9 X - 10 A CS111 Retrospective A CS111 Retrospective PS5: Recursion, JEMs, inheritance PS6: More recursion, recursive methods that return values X - 11 X - 12

  3. A CS111 Retrospective A CS111 Retrospective PS7: Lists, strings, recursive list methods, PS8: Iteration (while and for loops), lists of lists applications, linear collection data structures X - 13 X - 14 A CS111 Retrospective PS9: Arrays, data abstraction, declaring Java classes, using Java graphics, working in pairs X - 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend