Constructor Redux

Constructor Redux

For access to this article, please select a purchase option:

Buy chapter PDF
(plus tax if applicable)
Buy Knowledge Pack
10 chapters for £75.00
(plus taxes if applicable)

IET members benefit from discounts to all IET publications and free access to E&T Magazine. If you are an IET member, log in to your account and the discounts will automatically be applied.

Learn more about IET membership 

Recommend Title Publication to library

You must fill out fields marked with: *

Librarian details
Your details
Why are you recommending this title?
Select reason:
A Guide to MATLAB® Object-Oriented Programming — Recommend this title to your library

Thank you

Your recommendation has been sent to your librarian.

In the previous papers, objects were constructed in the most basic way because no arguments were passed into the constructor. With a no-argument constructor, all objects are constructed using the same initial values. For the cShape class, this basic approach worked because Part focused primarily on encapsulation mechanics. It turns the attention to inheritance and the development of class hierarchies. With the development of class hierarchies, it needs a richer set of construction options.

Chapter Contents:

  • 11.1 Specifying Initial Values
  • 11.1.1 Private Member Functions
  • 11.2 Generalizing the Constructor
  • 11.2.1 Constructor Helper /private/ctor_ini.m
  • 11.2.2 Constructor Helper Example /private/ctor_1.m
  • 11.3 Test Drive
  • 11.4 Summary
  • 11.5 Independent Investigations

Inspec keywords: object-oriented programming; software engineering

Other keywords: construction option; class hierarchy; encapsulation mechanics; constructor redux; cShape constructor; Matlab; object construction; no-argument constructor

Subjects: Software engineering techniques; Object-oriented programming

Preview this chapter:
Zoom in

Constructor Redux, Page 1 of 2

| /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch11-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch11-2.gif

Related content

This is a required field
Please enter a valid email address