Article

Home » Server-side Coding » Java and J2EE » Object Oriented Concepts in Java – Part 2

About the Author

Kevin Yank

author_kev1 Kevin began developing for the Web in 1995 and is a highly respected technical author. He wrote Build your own Database Driven Website using PHP and MySQL, a practical step-by-step guide published by SitePoint, and he's co-author of the SitePoint Tech Times, a bi-weekly newsletter for technically-minded web developers. Kev believes that any good webmaster should have seen at least one episode of MacGyver.

View all articles by Kevin Yank...

Object Oriented Concepts in Java – Part 2

By Kevin Yank

June 9th, 2001

Reader Rating: 9.5

Page: 1 2 3 4 5 6 7 8 9 10 Next

Object Oriented Programming (OOP) is a powerful force in the landscape of software development today. Some say (quite correctly, in my opinion) that the development efforts behind large software projects such as Microsoft Office simply would not be possible to manage without the modularity and code reuse made possible by today's object oriented languages. Others just prefer OOP because it pays better and it's more fun!

Whatever your reasons for learning the principles of OOP, Java is an ideal language in which to get your feet wet. It's friendly enough to beginners that you shouldn't be overwhelmed by complicated syntax if you're comfortable with basic programming concepts, and yet it is a truly complete, object oriented language, unlike many other Web development languages such as Perl, PHP, and ASP, which merely provide object oriented features.

This article is both the fourth in SitePoint's series on developing dynamic Web sites with Java, and the second of two parts that focus on teaching you what you need to know about Object Oriented Programming to take full advantage of what the Java language has to offer. If you have not read the previous articles in this series, I would definitely recommend backing up and starting from the beginning, as the concepts presented here rely on your knowledge of all that has come before.

In Part One, we looked at the basic concepts of classes, Objects, properties, and methods. We developed a simple class called Tree as well as a program to instantiate a few Trees and test out their height property and their grow method. After a brief look at inheritance, where we developed a subclass of Tree called CoconutTree, we looked at the issues you will face when copying and comparing Objects in Java. In Part Two, we'll pick up right where we left off by learning some more advanced types of methods and properties. We'll learn how these may be used to design better classes that exhibit some important features of good object oriented software design. In addition, we'll have a look at some advanced concepts in class design, and I'll provide an explanation of class packages, which let you organize your classes into groups.

With all the formalities out of the way, let's get started!

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links