Lecture 1
Object Orientation:
- a development strategy
- systems should be built from a collection of reusable components called objects
- a network of intelligent agents, communicating via messages
- why: much easier to build and debug than procedural code
- main attributes: operations not data
- Object≠data+methods
- encapsulation
- data is private
- implementation is hidden
- objects are defined by what they do, not what they contain
- rules
- don't ask object for data, but rather ask for work to do over that data (change a class's implementation without affecting any of objects using that class)
- Open-closed principle: software modules should be open for extension and closed for modification
Development Methodologies:
- Heavyweight process: when the entire problem is fully defined before development begins
- Lightweight process: when the problem definition changes as development is in progress
- Agile process: when requirements change
All large computer programs are nondeterministic: OOP doesn't eliminate the problem but makes it manageable.
Java Virtual Machine:
- "write once, run anywhere"
- when code is compiled, it produces a byte code instead of a binary executable
- JVM allows the byte code to run on any operating system with a JVM
- runs slower than compiled native languages
Lecture 2: Classes