Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA ABSTRACTION AND PROBLEM SOLVING WITH C++

Similar presentations


Presentation on theme: "DATA ABSTRACTION AND PROBLEM SOLVING WITH C++"— Presentation transcript:

1 DATA ABSTRACTION AND PROBLEM SOLVING WITH C++
Data Abstraction and Problem Solving with C++ Walls and Mirrors, Third Edition, Frank M. Carrano and Janet J. Prichard ©2002 Addison Wesley CHAPTER 1 Principles of Programming and Software Engineering DATA ABSTRACTION AND PROBLEM SOLVING WITH C++ WALLS AND MIRRORS Third Edition Frank M. Carrano Janet J. Prichard

2 Data Abstraction and Problem Solving with C++ Walls and Mirrors, Third Edition, Frank M. Carrano and Janet J. Prichard ©2002 Addison Wesley Figure 1-1 The life cycle of software as a water wheel that can rotate from one phase to any other phase

3 Data Abstraction and Problem Solving with C++ Walls and Mirrors, Third Edition, Frank M. Carrano and Janet J. Prichard ©2002 Addison Wesley Figure 1-2 The details of the sorting algorithm are hidden from other parts of the solution

4 Figure 1-3 A digital clock

5 Basic principles of OOP
Encapsulation Inheritance Polymorphism: objects can determine appropriate operations at execution time.

6 Figure 1-4 A structure chart showing the hierarchy of modules

7 Design guidelines Use OOD and TDD to produce modular solutions
Use OOD for problems that involve data Use TDD to design algorithms for an object’s operations Consider TDD to solve problems that emphasize algorithms over data. Focus on what, not how, when designing ADTs and algorithms. Consider incorporating existing software into your design.

8 visibility name: type = defaultValue
UML syntax: visibility name: type = defaultValue Figure 1-5 UML diagram for the class Clock

9 Key issues in programming
Modularity Modifiability Ease of use Fail-safe programming Style (use functions, private members, avoid global, error handling, readability, documentation) Debugging (debugger, profiler, assert, trace files)


Download ppt "DATA ABSTRACTION AND PROBLEM SOLVING WITH C++"

Similar presentations


Ads by Google