And that's it for our introduction to using Object Oriented (OO) design techniques. We've looked at inheritance, multiple inheritance and polymorphism, and you can see how designing the class tree structure in this way forces the designer to fully … [Continue reading]
Object Oriented Programming – Examples
Earlier we developed a class inheritance tree for some game characters in a maze game, but we need to design another class, or class hierarchy, for the maze. Since we want the mazes to have different levels of difficulty, each level of maze will … [Continue reading]
Object Oriented Programming 6
Now that we know what a class is, and how to derive classes using inheritance, we'll take a quick look at the slightly thorny issue of multiple inheritance. In the simplest terms, this is when a derived class has more than one base class. … [Continue reading]
Object Oriented Programming 5
To illustrate putting together an object oriented (OO) class hierarchy design, let's take a look at a simple maze game. We'll be creating an OO design, but we're not going to select a programming language at this stage. We'll see how we can … [Continue reading]
Object Oriented Programming 4
In object oriented (OO) programming, class inheritance is the process of deriving new classes from existing classes. It's a technique that was developed, at least in part, to enable the better reuse of existing code, but it can have its downsides … [Continue reading]
Object Oriented Programming 3
Encapsulation From what we've covered so far we can suggest that: A class is an abstract data type made up of a combination of the relevant data and associated methods. Each class not only has specific data members, it also has it's member … [Continue reading]
Object Oriented Programming 2
Imagine creating a blueprint for an intelligent robot. The robot's purpose is very simple: to open the curtains in the morning, and to close them at night. You call them CurtainBots, build three of them, and install them in your home. … [Continue reading]
Number Systems 3
The basic unit of computer storage is the eight bit byte, which can store values in the decimal range 0 to 255. The problem when dealing with numbers in binary format is that they quickly become very long. For instance, the number 317 is … [Continue reading]
Number Systems 2
Decimal The difficult for us when approaching computer number systems is that we're conditioned in to counting with our familiar base 10 system, or decimal. This system has 10 unique digits that represent units, tens, hundreds, thousands … [Continue reading]
Number Systems 4
At first glance all this switching between number systems (decimal, binary and hex) may not seem to be a help at all, but we've seen that only a very little effort can make it perfectly clear, not only in principle but also in practice. To … [Continue reading]