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
228 Software Essentials
one cannot instantiate an object from a class with an abstract method.
Again, contrast the clarity of using a self-documenting language keyword
to dene an abstract class, as shown in Example8.3, with a design solution
to dene abstract classes, as shown in Example 8.4.
Example 8.3: Abstract Classes in C# and Java
abstract class Vehicle
{ … }
Example 8.4: Abstract Classes in C++
// no keyword abstract => at least one method must be pure virtual
class Toy
{ public:
virtual bool safe() = 0;
};
// no keyword abstract
// => protected constructor, no public constructor
class Vehicle
{
protected:
Vehicle();
public:
};
An abstract class denes the interface for its descendants and estab-
lishes a dependency on descendants. ...
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