Object-Oriented Programming Introduction

Writing computer programs that use classes and objects is called object-oriented programming, or OOP. Every Java program consists of at least one class.

In the following posts, I’ll introduce you to object-oriented programming as a way to use classes that have already been written. Classes provide services to the program. These services might include writing a message to the program’s user, popping up a dialog box, performing some mathematical calculations, formatting numbers, drawing shapes in a window, or many other basic tasks that add a more professional look to even simple programs. The program that uses a class is called the client of the class.

One benefit of using a prewritten class is that we don’t need to write the code ourselves; it has already been written and tested for us. This means that we can write our programs more quickly. In other words, we shorten the development time of the program. Using prewritten and pretested classes provides other benefits as well, including more reliable programs with fewer errors.

This is similar to when we use latent space in machine learning for faster progress. Training in latent space is like using a prewritten class; taken to the limit, the algorithm you are is the “fastest” possible progress since the processing involves no time sweeping forward at all.

In the following post, we’ll explore how using prewritten classes can add functionality to our programs.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s