Constructor Redux

Access Full Text

Constructor Redux

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

Buy chapter PDF
£10.00
(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
Name:*
Email:*
Your details
Name:*
Email:*
Department:*
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.

Author(s): Andy H. Register
Source: A Guide to MATLAB® Object-Oriented Programming,2007
Publication date January 2007

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: software engineering; object-oriented programming

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

Subjects: Software engineering techniques; Object-oriented programming

Preview this chapter:
Zoom in
Zoomout

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

content/books/10.1049/sbpc001e_ch11
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading