CSE 201 Lecture Notes - Lecture 11: Software Design, Underlying Representation, Iterator

29 views2 pages

Document Summary

Cse 201 - lecture 11 - good design. Don"t reinvent the solution- as with any craft, programming contains undeniable element of experience. We achieve mastery through applying to actual problems/solutions. Programming idioms: often programming language-specific (i++ is same as i+=1 is the same as i=i+1) Design patterns are more abstract than programming idioms. Design patterns are description of problem and the essence of its solution is to enable the solution to be reused in different settings. Solutions are heavily influenced by practical experience. Gang of four design pattern book: 23 design patterns. Popular patterns: facade, adapter, observer, builder, singleton, iterator. Iterator: provide a way to access elements of an aggregate (collection) object sequentially without exposing its underlying representation. Aggregate object is collection of items: linkedlist foo; Java iterator is an interface that can be implemented by any aggregate and has the following methods: hasnext(), next(), remove() Lingo is helpful: many large projects and programming languages use terminology from design patterns.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents