This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes C / C++ and the fly likes does your book attempt to deal with those of us who have a bit of difficulty with OOP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "does your book attempt to deal with those of us who have a bit of difficulty with OOP? " Watch "does your book attempt to deal with those of us who have a bit of difficulty with OOP? " New topic
Author

does your book attempt to deal with those of us who have a bit of difficulty with OOP?

Penny Elaine
Greenhorn

Joined: Apr 08, 2002
Posts: 1
please dont curse me... every now and then i seem to really understand it, but i am a programmer from the 'good old days' and i need someone who can relate that programming to OOP so that i can understand better
thanks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38025
    
  22
Welcome to the Ranch

There is no need to rush so after logging on, before posting for the first time. Some people manage 10 years' membership before posting
Brian Overland
author
Ranch Hand

Joined: Sep 09, 2011
Posts: 36
Answer: (although please note i'm a little biased <grin>)...

Yes, I have gone out of my way to think very deeply about the ways of teaching OOP concepts so people can understand it. If you have questions about it in the future, please contact me at Briano2u@aol.com. (Sorry I am late coming to this thread... some family emergencies got in the way.)

The question of how to teach OOP concepts has been something that has deeply occupied me for many, many years. I love the whole writing challenge. Unfortunately, the field of writing about object orientation has attracted florid, elaborate analogies, dry technical descriptions that are hard to follow, or puffed-up promises that I feel are not justified. So for this edition, I scaled some of the rhetoric down and tried to emphasize what the practical, demonstrated advantages and concepts are.

One thing I do is not to introduce too much object orientation right away, believing that new programmers have enough to worry about just learning the basic syntax of variables, functions, control structures, and so on. However, in my book, the built-in objects "cin" and "cout" form the basic of input/output from the beginning, and I see this as a springboard to understanding other objects later on. So of course, all input/output in the book utilizes these built in objects for I/O, along with file objects.

To help you just a little, consider that object orientation is a way of letting the programmer customize his or her own data types to the maximum extent. One of the major goals of the book is to show, for example, that in addition to the integer and floating-point built-in data types, you can provide your own custom data types (such as fractions and points) and then define what it means to add, subtract, and multiply them.

But object orientation is more than that. It is also a way of organizing programs. An object (and other objects of the same type, called classes) is a data item that "knows" how to repond to functions and/or operators.

Why is this useful?

That's a question I take on in the book at some length, but the basic answer is this: as programs get larger and larger, and data interactions get more complex, it can be very helpful to organize programs into units (called classes and objects) in which closely related data and function code are kept together. There is little "magic" here... you still have the hard work of programming to do, but for complex programs it is a superior kind of organization.

My challenge has always been to show how smaller programs can benefit from object orientation. This I've tried very hard to do in my book... I believe, once again, the answer is to be found in the use of simple I/O objects and in taking advantage of the Standard Template Library (STL), which can save you a great deal of work -- but requires that you understand the class/object syntax!

Thanks for the question,

Brian Overland
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38025
    
  22
Welcome to the Ranch
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: does your book attempt to deal with those of us who have a bit of difficulty with OOP?
 
Similar Threads
OOP Design.
FBN: criteriaFind(String criteria) method; is this ok ?
OOP considered harmful (was: C. Date on UML book)
Suspected class path problem
Which Monty Python character are you?