Electrical and Computer Engineering
12 of 30
UAH
CPE 112
Designing Functions
•The specification of what a function does and how it is invoked defines its interface.
•By hiding a module implementation, we can make changes to it without changing the main function, as long as the interface remains the same.
•Designing a function should be divided into two tasks:
–Designing the interface
–Designing the implementation