Tech News

Separating Rules and Data from Code

The cdate Class One of the biggest problems in the software-development world is maintaining code that we did not design or implement in the first place. Often the hardest thing to do in such cases is to figure out exactly how the code was meant to work. Usually, there is …

Read More »

Inheriting Data and Functionality

Implementing a configurationfile Class I n general, the single greatest bit of functionality that C++ has to offer is inheritance — the transfer of characteristics from a base class to its derived classes. Inheritance is the ability to derive a new class from one or more existing base classes. In …

Read More »

Customizing a Class with Virtual Functions

Customizing a Class with Polymorphism Polymorphism (from the Greek for “having many forms”) is what happens when you assign different meanings to a symbol or operator in different contexts. All well and good — but what does it mean to us as C++ programmers? Granted, the pure virtual function in …

Read More »

Protecting Your Data with Encapsulation

Creating and Implementing an Encapsulated Class The dictionary defines encapsulation as “to encase in or as if in a capsule” and that is exactly the approach that C++ uses. An object is a “capsule” and the information and processing algorithms that it implements are hidden from the user. All that …

Read More »