Skip to Content
Computers as Components, 2nd Edition
book

Computers as Components, 2nd Edition

by Marilyn Wolf
July 2008
Intermediate to advanced
544 pages
16h 52m
English
Morgan Kaufmann
Content preview from Computers as Components, 2nd Edition
3.7 Design Example: Data Compressor 139
shows a state diagram for insert. It shows that we must consider two cases—the
new symbol does not fill the current buffer or it does.
3.7.3 Program Design
Since we are only building an encoder, the program is fairly simple. We will use
this as an opportunity to compare object-oriented and non-OO implementations by
coding the design in both C++ and C.
OO design in C++
First is the object-oriented design using C++,since this implementation most closely
mirrors the specification. The first step is to design the data buffer. The data buf fer
needs to be as long as the longest symbol. We also need to implement a function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computers as Components, 3rd Edition

Computers as Components, 3rd Edition

Marilyn Wolf
Computer System Designs: System-on-Chip

Computer System Designs: System-on-Chip

Michael J. Flynn, Wayne Luk
PC Hardware in a Nutshell, 3rd Edition

PC Hardware in a Nutshell, 3rd Edition

Robert Bruce Thompson, Barbara Fritchman Thompson

Publisher Resources

ISBN: 9780123743978