CPSC 210 Lecture Notes - Lecture 5: Steve Mcconnell, Muay Thai, Graphical User Interface
Document Summary
Learning goals specify a robust data abstraction implement a robust class design robust software use java exceptions. Software that is robust performs well in a variety of situations. Object-oriented software design aims to structure a solution to a problem in terms of abstractions that model the problem domain. The key abstraction mechanism used to achieve such structure is data abstraction. We define a data abstraction used in an object-oriented program through a specification that focuses on specifying the operations provided by the data abstraction. The specification for an operation defined on a data abstraction places constraints on the situations in which the operation may be used. For example, the animal data abstraction from the data abstraction reading included an operation recordlastfeeding that required a list of the food eaten to not be empty. Here is the specification of just that operation in the animal data abstraction: // effects: this updated with foodeaten public void recordlastfeeding(list foodeaten)