Exercises, examples and other material relating to training module Q906. 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++,
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
Object Orientation is perhaps the best design approach for medium-size to large applications and systems. In this module (the first of three on Object Orientation that are equally applicable to all the OO languages that we teach), we define object orientation, and study the design of simple objects.
Related technical and longer articles
Incr-Tcl - Object Oriented extension to TclObject Orientation in Perl - First Steps
| Articles and tips on this subject | updated |
| 3436 | Moving from scripting to Object Orientation in Python Using what's been described as the scripting idiom, a "scripter" will write a series of code steps which perform a task from top to bottom. For a job that only involves simple data manipulation (even if there's a lot of data to have that manipulation applied), this approach can be very effective indeed ... | 2011-09-14 |
| 2651 | Calculation within objects - early, last minute, or cached? When you create an object with the constructor, you may also set property [attribute] values within it ... or you may follow on with a series of method calls to set the initial values. Then when you pull back values / attributes / properties from your object you return those values, or the results ... | 2010-03-03 |
| 2393 | A first demonstration of OO, including polymorphism "Object Oriented" often means big and heavy code even for the first example application demos ... since OO works really well when you're meeting requirements beyond those which are small enough to be described as 'trivial'. So I'm very pleased with this little demonstration in Python which shows - all ... | 2009-09-05 |
| 2171 | Cleaning up redundant objects In Object Oriented Design, you'll find that there's a piece of code you can add to your classes called the destructor method ... which you don't usually call explicitly in your code.
When a variable goes "out of scope" and is no longer available to your code , it is marked for destruction so that any ... | 2009-05-12 |
| 2173 | Basic OO principles Object Oriented Programming is often described as "data driven", but what does that mean?
For delegates who have been on my Object Oriented courses, I'm reproducing here is a diagram that I develop on the board during the course. And I'm reproducing it with some reluctance, as it's the very development ... | 2009-05-12 |
| 1925 | Introduction to Object Oriented Programming "Object Oriented Programming" is a whole new philosophy for programmers who have been writing short scripts for years, and it can be quite frightening to learn with all these new buzzwords like "overriding", "encapsulation" and "polymorphism" creeping in. It's a beautiful concept and a lovely approach, ... | 2008-12-10 (longer) |
| 1864 | Object Oriented Perl - First Steps There are some occasions when a new example that I write / a topic that comes up on a course results in an article that's so long that it doesn't fit into the Blog / short article format, but requires a more substantial mechanism.
And so it is for my First steps in Object Oriented Perl examples, written ... | 2008-11-02 |
| 227 | Bellringing and Programming and Objects and Perl For the second time this year (and it's only the second month), I find that I have a keen bell-ringer on my programming course ... he's off each evening to meet up with fellow bell-ringers in church towers in Wiltshire, and having a really good time outside course hours as well as during the day. I understand ... | 2008-05-16 |
| 1543 | Learning Object Oriented Principles (and perhaps Java) During an intensive 3 day Java course last week, I gave an introduction to the principles of Object Oriented Design, and a very short segment on design principles (there's a limit to how much can be covered in three days, and Java itself was the main topic).
As a follow up to that course, I promised ... | 2008-02-17 |
| 507 | Introduction to Object Oriented Programming So what exactly IS object oriented programming? Easy question to ask, but a hard one to answer in just a sentence or two. Let's try.
In an object oriented scenario, you group together all the pieces of code that relate to a certain type of data. That code grouping will be called a class and it will ... | 2006-06-05 |
Examples from our training material
| an01 | creating a hash of data in Perl |
| an02 | creating a hash of data in a package in Perl |
| an03 | Creating and accessing simple objects in Perl |
| animal.pm | Creating and using Perl objects in a class |
| bells.pm | Bell change class - notation and change interpreter |
| classic.php | First Class demo |
| osx.php | An array of objects |
| rails_oo | Using the Object Oriented idiom |
| rails_script | Using the scripting idiom |
| ringer | Test program for the "bells" class |
| sc.java | Structured code in Java |
| sc.perl | Structured code in Perl |
| ua | Final example - calling basic Perl classes |
| ua01 | Calling functions in Perl from another file |
| ua02 | Calling functions from a module in Perl |
| ua03 | Creating and using objects in Perl |
Pictures
Object Orientation really works ;-)
Background information
This module is available under an
Open Training Notes License for free download from
http://www.training-notes.co.uk.
Topics covered in this module
A History.
Unstructured Code.
Subroutines, functions, procedures.
Structured Programming.
Object Oriented Programming.
A note on political, or religious issues.
Introduction to OO Programming.
Classes.
Methods.
Static and Nonstatic.
Instances.
Constructors.
Destructors.
Overloading.
Accessing members of a class.
Loading.
Use.
Direct access to variables.
Testing.
Encouraging class use.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses 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. Also
available is the Opentalk
Forum for discussion of technical questions.