JDT

 

John Dixon
Technology
Limited

 
Google

Introduction to Object Oriented Programming (OOP)


In this article I describe, at a very simple level, my interpretation of Oject Oriented Programming (OOP).

Basically, there are things called classes. Just think of a class as being a 'type' of thing. For example, if you have a website that lets users register and log on to the site, you might set up a user class to enable them to do this.

Classes can be described and they can also do things. So, for example, for our user class we might describe (identify) users by means of their names, passwords, and email addresses.

'Name', 'password' and 'email address' are called data members. The user will also be able to do things, for example, register with the site, log on to the site and, say, create articles. 'Register', 'log on' and 'create article' are called methods.

When a user attempts to log on to the website, probably by entering their name and password into a form, the 'log on' method can be called to check that the user is allowed to access the site. This will probably be done by checking the user's name and password against a list of users stored in a database.

When a user attempts to log on, they create a particular occurrence or instance of a class. So, for example, if the class is called 'users', an instance of that class might be 'john'. The class describes the users, whereas john is an actual user - he's an object.



Go back to Articles home page

Go back to Programming and Web Development Articles home page



Earnings Tracker is John Dixon Technology's FREE open source accounting / bookkeeping software.

The software is written in PHP and MySQL and is available to use for FREE online, or as a FREE download.

Earnings Tracker, which is aimed at UK contractors, freelancers, and other very small businesses, lets you keep track of your company's revenue and spending.

Earnings Tracker can also be used simply as a dividend, corporation tax, or VAT calculator.

free accounting software
 


JDT

© 2007-2009 - John Dixon Technology Ltd

Privacy Statement

Terms & Conditions