For 2021 - online Python 3 training - see ((here)).
Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.
Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Well House Consultants
You are on the site of
Well House Consultants
Open Source Training Courses
hotel accommodation. You are welcome to browse and use
our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Well House Manor Resources
Object Orientation and General topics
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
C and C++ Resources
Web and Intranet Resources
Object Orientation and General technical topics module Q909
Object Orientation: Composite Objects
Exercises, examples and other material relating to training module Q909. This topic is presented on public courses Learning to program in Python
, Learning to Program in Java
, Learning to program in Ruby
, Learning to program in C and C++
, Object Oriented Programming in PHP
, Python Programming
, Perl for Larger Projects
, C++ for C Programmers
, C and C++ Programming
, Java Bootcamp
, Ruby Programming
, Java Programming for the Web
, Intermediate Python
, Learning to program in C and C++
, C and C++ Programming
This is the second of three modules on Object Orientation which are equally applicable whether you're programming in Java or Perl, PHP or Python. Topics covered include Polymorphism, Inheritance and Overloading.
Related technical and longer articlesInheritance
|Articles and tips on this subject||updated|
|4450||Deciding whether to use parameters, conditional statements or subclasses|
"If you find yourself repeating a piece of code, there must be an easier way" But what if you have a number of similar but not identical items / things / objects?
If the things that change between each of your objects are just data values - for example the number and ages of childen - then you can handle ...
|4394||Philosophy behind object design - and how I applied in to a Java example|
* When you're writing all the logic to deal with a particular type of data, it's a good idea to write it into a CLASS
* Where you have similar types of data, it's a good idea to put the shared logic into a BASE CLASS and then write SUBCLASSES which are based on that base class. That way your common ...
|4377||Designing a base class and subclasses, and their extension, in C++|
My first technical post for 2015 - looking back at some of last year's new C++ examples.
Oh - OK - I'm writing this on 1st January and these examples were written and uploaded yesterday, so they're nothing like as old as it sounds.
On Monday and Tuesday, I wrote classes from scratch and looked at basic ...
|3979||Extended and Associated objects - what is the difference - C++ example|
When you use inheritance, you create a tree of object types, where one type is based on another. For example, you define a base class of "transport" and then you extend that to define similar classes with extras called "bus" and "train". That's a very different matter to using a class connected in ...
|3609||How do classes relate to each other? Associated Classes|
How do classes relate to each other? Associated Classes ... or ... define: Associated classes, parent classes, superclasses, subclasses, base classes, abstract classes, interfaces and mixins.
Associated classes are the odd ones out here. They're classes that are used within other classes.
Let me ...
|477||Class, static and unbound variables|
In Object Oriented programming, you'll have certain named blocks of code (usually known as methods) that you can perform on specific objects (type A), and others that you can perform on all the objects of a particular type (type B).
If I had a class called sandwich, I might have one method ...
|3251||C++ - objects that are based on other objects, saving coding and adding robustness|
In a previous article ([here]), I talked about how we introduce the basic concepts of classes, methods and objects on our C++ courses. I'm now going to give you some links to the next series of example which I wrote during that same course.
Having covered object basics, we moved on to look at related ...
I've been reading a report on a minor railway accident which could have been much more serious - a crane driver swung a piece of rail he was replacing on one track in front of a train that was approaching on another line - [report here], and it struck me as I read just how many abbreviations / acronyms ...
|3142||Private and Public - and things between|
A public train service is one which is available for anyone to travel on; a private one only takes limited passengers as invites / made available by the operator. And there could be intermediate levels too - I understand that at times the British Transport Police protect the last train from Weymouth ...
|2922||Getting the OO design write - with PHP a example|
One of the great beauties of Object Oriented Design is that you can say "I want to handle a type of data that's based on an xxx", and if someone's already written (and made available) the code for an xxx, all you have do do is define the additions and differences, rather than starting from scratch. ...
|2865||Relationships between Java classes - inheritance, packaging and others|
When you're designing classes in Java, you need to consider their relationship with one another in various ways.
• You need to consider class INHERITANCE - which classes are based on which other classes. For example, a Pet could be based on (i.e. extended from) an Animal.
• You need to consider ...
|2641||Object Oriented Programming in PHP|
New ... for the first time ever ... our Object Oriented PHP Programming training course is running on a Monday. That's Monday, 26th April 2010. It then revert to Friday - its more normal day of the week - in May.
PHP's roots were not object oriented ... and in the early days of it being used for ...
|2170||Designing a heirarcy of classes - getting inheritance right|
You friend Will has written a class to handle management information about articles. It's great as far as it goes, but you want to add extra stuff to it, so you persuade Will to give you a copy. He's a nice guy, he does so ... but then a month later he tells you he's added a lot more code and you're ...
|1348||Screw it or Glue it? Access to Object variables - a warning|
If you screw two pieces of material together, you have the opportunity, later on, to unscrew them ... resuse them differently, install a waterproof membrane between them, and so on. But if you glue them together, later modification will be much harder or perhaps impossible. And in a similar way, if ...
|1345||Perl and Shell coding standards / costs of an IT project|
There are three major staff costs in the life of an IT project - the specification and development of the system, the maintainance and upgrading of the system though its life, and the investment that's made in data entry and integrity through the life of the system. And although there's a lot of thought ...
|592||NOT Gone phishing|
Early last week, I was giving a training course on Perl and talking a little bit about Perl objects - how all the internal logic that's associated with a particular type of data can be hidden within a source file so that the person writing the code to call it up only needs to understand what to put in, ...
Examples from our training material
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from [here]
Topics covered in this module
Base classes and subclasses.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.