http://iet.metastore.ingenta.com
1887

Constructing Simple Hierarchies with Inheritance

Constructing Simple Hierarchies with Inheritance

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.

The paper states that by using cShape function, it has drawn shapes that look like a star, a rectangle, and a diamond. Even though these three shapes have a lot in common, it is recognized as three different shapes. The inheritance builds a set of classes to recreate this taxonomy without copying a lot of code. Member functions common to all shapes are found only in cShape. Member functions with code tailored for each particular shape type are found in each particular directory. Inheritance is the glue that allows to build the hierarchy and allows MATLAB to find the appropriate function.

Chapter Contents:

  • 12.1 Simple Inheritance
  • 12.1.1 Constructor
  • 12.1.2 Other Standard Member Functions
  • 12.1.2.1 Child Class fieldnames
  • 12.1.2.2 Child Class get
  • 12.1.2.3 Child Class set
  • 12.1.3 Parent Slicing in Nonstandard Member Functions
  • 12.1.3.1 draw.m
  • 12.1.3.2 mtimes.m
  • 12.1.3.3 reset.m
  • 12.2 Test Drive
  • 12.3 Summary
  • 12.4 Independent Investigations

Inspec keywords: object-oriented programming

Other keywords: member function; hierarchy construction; shape type; function inheritance; Matlab; cShape function

Subjects: Object-oriented programming

Preview this chapter:
Zoom in
Zoomout

Constructing Simple Hierarchies with Inheritance, Page 1 of 2

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

Related content

content/books/10.1049/sbpc001e_ch12
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading
This is a required field
Please enter a valid email address