3 November 2013

Data Structures

A mock bank form.




On a basic level, computer programs are made up of numbers and letters, with letters, or characters, simply being alternative representations of numbers. Since creating a program that would be large enough to be useful would be tedious if everything were coded using raw mathematical operations, object-oriented programming was created. In object-oriented programming, numbers, letters, words, and mathematical operations can be grouped together to create an object. Objects can even contain objects. There are also classes, which define what types of objects can exist. Since objects hold multiple bits of information together, they can sometimes be called “data structures”.

For one of my early university assignments, I acted in a hypothetical scenario where I had to program a bank's computer to store a list of customers and use that list to authorize ATM transactions. I created a class that defined a customer. A customer was an object that had a first name, a last name (both strings of letters), a bank ID number (an integer), and a monetary balance (also an integer, representing the amount in cents).

Since all customers have this standardized set of features, a computer can use my Customer class to quickly look at and authorize the customers with no technical problems. With speed being less of an issue, the bank's computers can look up a huge database of customers quickly. Since each customer's information is structured consistently, data structures are comparable to a form that a customer fills in by hand, which also provides the bankers a consistent set of information.