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
Design Alternatives and Perspectives 253
Example 8.17: C# StudentEmployee: Student Parent
interface EmployeeI
{…}
public class StudentEmployee3: Student, EmployeeI
{
private Employee e;
// interface forces echo of Employee functionality
}
is third design, StudentEmployee3 is-a Student and contains an
Employee object, oers the additional benet of exibility relative to
the car dinality, association, and lifetime of the Employee subobject.
A StudentEmployee3 could have two jobs, zero jobs, or be in-between
jobs and still remain a student. e enduring type value of Student to a
StudentEmployee3 indicates why it is less desirable to subordinate Student
toEmployee.
A drawback to modeling inheritance with composition is loss of access ...
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