Chp~18 - C+ PROGRAMMING Chapter 18 Object-Oriented Analysis...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
C++ PROGRAMMING Chapter 18 Object-Oriented Analysis and Design The Development Cycle Simulating an Alarm System Preliminary Design What Are the Objects? Other Objects What Are the Classes? How Are Alarms Reported? Event Loops Listing 18.1. A simple event loop . PostMaster Measure Twice, Cut Once Divide and Conquer Message Format Initial Class Design Rooted Hierarchies Versus Non-Rooted Hierarchies Figure 18.1. Designing the Interfaces Building a Prototype The 80/80 Rule Designing the PostMasterMessage Class Application Program Interface Listing 18.2. PostMasterMessages interface . Programming in Large Groups Ongoing Design Considerations Design Decisions Decisions, Decisions Working with Driver Programs Listing 18.3. A driver program for PostMasterMessage . Summary Quiz Exercises
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Chapter 18 Object-Oriented Analysis and Design It is easy to become focused on the syntax of C++ and to lose sight of how and why you use these techniques to build programs. ToChapter you will learn How to analyze problems from an object-oriented perspective. How to design your program from an object-oriented perspective. How to design for reusability and extensibility. The Development Cycle Many volumes have been written about the development cycle. Some propose a "waterfall" method, in which designers determine what the program should do; architects determine how the program will be built, what classes will be used, and so forth; and then programmers implement the design and architecture. By the time the design and architecture is given to the programmer, it is complete; all the programmer needs to do is implement the required functionality. Even if the waterfall method worked, it would probably be a poor method for writing good programs. As the programmer proceeds, there is a necessary and natural feedback between what has been written so far and what remains to be done. While it is true that good C++ programs are designed in great detail before a line of code is written, it is not true that that design remains unchanged throughout the cycle. The amount of design that must be finished "up front," before programming begins, is a function of the size of the program. A highly complex effort, involving dozens of programmers working for many months, will require a more fully articulated architecture than a quick-and- dirty utility written in one Chapter by a single programmer. This chapter will focus on the design of large, complex programs which will be expanded and enhanced over many years. Many programmers enjoy working at the bleeding edge of technology; they tend to write programs whose complexity pushes at the limits of their tools and understanding. In many ways, C++ was designed to extend the complexity that a programmer or team of programmers could manage. This chapter will examine a number of design problems from an object-oriented
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

Chp~18 - C+ PROGRAMMING Chapter 18 Object-Oriented Analysis...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online