Changes

Jump to: navigation, search

Project A2 20141 - OOP344

95 bytes added, 16:42, 7 March 2014
iFrame: Cleanup
== iFrame ==
iFrame is an interface class that describes a widget that has a frame. We can easily spot interface classes by looking for the "i" at the beginning of their name. A widget is basically a window component such as a label, a button, a field, or even a full window. Since it iFrame is an interface, iFrame's job is to declare a the set of functionality that every framed object can publicly perform. We call this type of design '''design by contract''' because we can think of any class inheriting derived from iFrame to be '''contractually obligated to fulfill what iFrame has promised'''.
iFrame's contract consists of a set of pure virtual functions that any concrete deriving class '''must implement'''. In this case, iFrame declares that any object instanced from a class derived from iFrame it can draw itself, hide itself, and move.
== CFrame ==
CFrame is iFrame's child and implements iFrame's core responsibilities. The "C" in CFrame stands for "concrete" (even though it is technically abstract! More on this later).

Navigation menu