Skip to Main Content
Software Essentials
book

Software Essentials

by Adair Dingle
July 2014
Intermediate to advanced content levelIntermediate to advanced
436 pages
12h 27m
English
Chapman and Hall/CRC
Content preview from Software Essentials
Structural Design 161
simulated with composition. To illustrate an eective inheritance design,
we revisit the Icon example from the previous chapter, where the design
goal was to represent Icons and their movement in a computer game.
We expand the Icon type denition to include the data and functional-
ity needed to support movement. Icons can spin, slide, or hop, with the
restriction that any particular icon is capable of only one type of move-
ment. A spinner cannot hop, a hopper cannot slide, etc. Furthermore,
the type of movement associated with an Icon does not change. us,
a slider cannot spin, not now, not ever. We incorporate into our design
the ability to track what “type” of movement an Icon object exhibits.
Example 6.7 sho ...
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

Software Architect’s Handbook

Software Architect’s Handbook

Joseph Ingeno
Economics-Driven Software Architecture

Economics-Driven Software Architecture

Ivan Mistrik, Rami Bahsoon, Rick Kazman, Yuanyuan Zhang
Software Architect Bootcamp

Software Architect Bootcamp

Raphael Malveau, Ph.D. Thomas J. Mowbray

Publisher Resources

ISBN: 9781439841204