CMPSC 24 Chapter Notes - Chapter 1: Information Hiding, Code Reuse, Function Prototype
Document Summary
Object-oriented programming (oop) = a technique that encourages important strategies of information hiding and component reuse. Design = formulated steps to solve the problem. Implementation = the actual c++ code that carries out the design. Algorithm = set of instructions for solving a problem. Generally written in english mixed with c++ when convenient. Pseudocode = mixture of english and programming language used to improve clarity. When designing an algorithm, break down the problem into a few small subtasks, then smaller subtasks, etc. Code reuse = a function is written with sufficient generality that it can be reused elsewhere. Information hiding = knowing only as much as you need, but no more. Technique for incorporating information hiding involves specifying functions" behaviors. Precondition = statement giving the condition that is required to be true when a function is called. Postcondition = statement describing what will be true when a function call is completed.