Slashdot Mirror


Good Textbooks for Object Oriented Programming?

Captain_Frisk asks: "My buddy and I have recently received approval to teach a programming course at our Alma Mater. We have pretty much free reign over what we teach, so we've elected to teach 'An Introduction to Object Oriented Programming,' to fill a void at a school where the only programming languages taught are C and Matlab. Can anyone out there recommend some good books for the course, not just for the students, but for us to read as preparation material? We've never taught a class before, and as graduates of this school, we've never had any formal training in OOP. I read a few books at work a few years back, but I don't remember their names, nor did they strike me as particularly memorable. So far I've looked at An Introduction to Object-Oriented Programming and Object-Oriented Software Construction, 2nd Edition (a book reviewed at Slashdot 3 years ago), but have not invested in either."

38 comments

  1. Booch, Gamma (GoF) by Ars-Fartsica · · Score: 2
    Grady Booch has written excellent books on object-oriented design. Design Patterns by Gamma, et al is widely recognized as an excellent Patterns book. Some people also like Bertrand Meyer's "Object Oriented Software Construction" but this seems to have migrated to an Eiffel tutorial in later editions.

    Best place to start is the comp.object FAQ. Don't underestimate the power of some of the better FAQ's out there - you can get a good grasp of basics and an excellent review of literature, all gratis.

    1. Re:Booch, Gamma (GoF) by Anonymous Coward · · Score: 0

      I thought about suggesting design patterns too but I still to read my copy. It is really supposed to be a good book. Another suggestion might be to teach java- it is supposed to be pretty OO based and treat everything as a first class object and stuff. Haven't picked up java yet either so I could be wrong.

  2. Depends on the level..... by pjdepasq · · Score: 2

    One key point you neglected to state is the level of instruction you are participating in. Are you getting involved in high school programming or college? There are texts for both areas, and you might get a better reponse by telling us.

    Secondly, if you are going to be doing high school instruction, you might want to consider broading your research. The AP test (for high school students to get college credit) will be in Java starting in '02 or '03 (I forget), so that might impact your decision, since you *might* be helping your students by getting them acclimated to Java and OOP from the start.

    1. Re:Depends on the level..... by Captain_Frisk · · Score: 2

      This is a college course. It is assumed that all students taking the class will know C.

    2. Re:Depends on the level..... by pjdepasq · · Score: 4, Informative
      Ah, ok.

      Well, I've done a Java for juniors and seniors who already know OOP here at VT. In the past we have used the Core Java Volume 1 book, but that's not appropriate to your audience, since they don't already know OOP.

      Take a look at Java Software Solutions (Addison-Wesley, author=John Lewis), if you are looking for a book tied directly to a language that the students will be working with. (Shameless plug: John was my Master's advisor, and I contributed to the text). It's been very well received at the collegiate level and is well supported. Since your students know C, they may be able to skip a few intro chapters on programming, data types, etc... or at least get through them quickly.

      Deitel and Dietel's Java texts are also popular.

      If you are looking for only a discussion of OOP topics and not bound to a particular language, I can't be of too much help there, I've not perused any of those recently.

      One final point. Please consider attending SIGCSE (http://www.cs.cofc.edu/sigcse2002) in February. It's an invaluable resource for computer science instruction for both new (novice) and old (er, experienced) instructors. SIGCSE is a great place to make contacts, get help on related issues, check out the texts, etc....

    3. Re:Depends on the level..... by heliocentric · · Score: 2

      Deitel and Dietel's Java texts are also popular.

      I recently took a Java class and the prof complained and complained about the lack of "good" java texts and how he might just have to resort to writing his own. The course had used Deitel and Dietel the semester before I took it, but was stopped due to the overwhelming number of errata in the text. When I took it we used Kalin's Object Oriented Programming in Java however the two or three times I used the text I saw errors on a few pages.

      If you are looking for only a discussion of OOP topics and not bound to a particular language...

      I kinda think that's the topic the person was really looking for, but I'm not sure since he does list the few languages taught. Maybe the person hasn't decided what track they wish to take (OO SE or coding), but I can throw in my $0.02 on this subject. I've taken several OO design and SE classes. This one has changed since I took it, it now uses the Booch book referenced in an earlier post as well as a UML book. Back in my day (man I'm feeling old here) we had a really bad small talk book, but it did drive home selecting a good hirarchy of classes. This other one has also changed since I took it, it now uses a UML book as well. When I had the second class we used Schach's Classical and Object-Oriented Software Engineering (I later used that text in some silly MSIS Grad class I took for giggles). There are a few editions I beleive of that book, we used the one with Java and UML and included a CD with Popkin's System Architech 2001. The Schrach book is an OK book from the SE standpoint, but I think the ordering is a little out of order.

      Maybe they'd like to toss all of this out and teach formal software design techniques and include methodologies for proving source code meets the design and things like DFD-SPECS and SPECS-C++, nah, maybe you're right, they probably just want to teach Java's objects to the kids who know C structs.

      --
      Wheeeee
    4. Re:Depends on the level..... by FortKnox · · Score: 2

      Hopefully you are still looking.

      The best two books that taught me OOD would be "Thinking in C++" and "Thinking in Java" by Bruce Eckel. Easily teaches the ideas extremely well. Also try "Design Patterns" after the basic idea of OOD is learned.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    5. Re:Depends on the level..... by Anonymous Coward · · Score: 0

      It might be helpful if you explained who your intended audience is, as this will greatly infuluence the type of book you want & neccessary scope of the class. It's pretty safe to assume that they're not CS students, as any school with a CS program would have a factulty member who'd teach the class.

      Hrmm... C and Matlab, we're probably either talking about engineering students. Are they more likely to want theory or practical, directly useful knowledge? Are they more likely to use their programming skills to produce large, robust software that is likely to be used by hordes of people, or quick & dirty simulations to help with their work?

      These are the sorts of questions you need to know the answers to before you can decide what a makes a good book. A good text book is not only comprehensive, correct and well written, but it is applicable to the material the student is being taught. A book that diverges too much from what the instructor presents will do more to confuse the student than enlighten them.

  3. Books and Languages by randombit · · Score: 2, Informative

    One book that I would really recommend is Design Patterns (to just about anyone doing program design, really). It's excellent. The Gang of Four (as the authors are usually refered to because nobody can ever remember all their names :P) did one or two other books on a simliar line ("More Design Patterns", I think?).

    Since you didn't say what kind of language you're going to use, and you mention the only stuff there is C and Matlab, I'll throw out some languages suggestions as well:

    It kind of depends on the experiences of the people you're teaching. If they already know C, C++, or Java, maybe doing the course in C++ or Java is the way to go. However, they may have too many preconcieved notions in those languages (like old C programmers moving to C++, and basically still writing C, ignoring the OO stuff when they can) to be effective object oriented programmers in those languages without some other experience.

    So you may want to look into something like Python. I can't think of any other major OO scripting languages (Perl doesn't really count too much), and ML/O'Caml/Lisp/Scheme aren't really OO langauges in that sense.

    Oh, maybe Smalltalk would work I don't know of any free implementations, hopefully there is in fact at least one good one. Objective-C is C plus Smalltalk-style OO and as it's built into GCC, it would be available for everyone, so that might be another option. Since it's much less complicated than C++ (I like C++ but even I think it's a huge language), it would be relatively easy to learn in short order.

    1. Re:Books and Languages by StandardDeviant · · Score: 3, Informative

      for a free smalltalk implementation, check out Squeak. But if they know C, throw Java at them. Free tools that work on most any platform, plenty of good books (c.f. Thinking in Java by Bruce Eckel, which you can read online in a variety of formats (scroll down some on that page)), and not a huge syntactic leap to get in the way of the OO concepts, yet enough of one that they can't just code "C in C++". I've always been fascinated by Obj-C but I've had little luck finding good intro material.

      HTH :-)

    2. Re:Books and Languages by Matthew+Weigel · · Score: 2
      I've always been fascinated by Obj-C but I've had little luck finding good intro material.

      Apple has published, through Fatbrain, Object-Oriented Programming and the Objective-C Language - it looks like it addresses Obj-C separately from Cocoa, which is a good thing (remember, everyone, gcc supports Obj-C too :).

      --
      --Matthew
    3. Re:Books and Languages by randombit · · Score: 1

      Apple has published, through Fatbrain, Object-Oriented Programming and the Objective-C Language

      Apple also has tons of documentation online, including a big fat PDF about Objective C which I have not yet had time to read.

    4. Re:Books and Languages by JamesOfTheDesert · · Score: 1
      I can't think of any other major OO scripting languages

      Try Ruby.

      --

      Java is the blue pill
      Choose the red pill
    5. Re:Books and Languages by StandardDeviant · · Score: 1

      in case anyone comes along curious, I'll save you the effort of searching for that big pdf randombit mentions:

      http://developer.apple.com/techpubs/macosx/Cocoa /O bjectiveC/ObjC.pdf

  4. Here's two more... by whydna · · Score: 1

    The OOP course at my school (which is geared towards students that already have a Java background) uses the following books:

    "Fundamentals of Object-Oriented Design in UML" by Melier Page-Jones. This is book that covers software design using UML.

    "Object-Oriented Software Design & Construction with Java" by Dennis Kafura. The title pretty much summarizes the book.

    UML is a good tool for teaching OOP, in my opinion. It helps to illustrate concepts that can be difficult to understand trough code alone. Dynamic Binding is a good example of this.

    I currently TA for our intro to comp. sci course (which uses Java). A lot of students get hung up on the difference between between an instance variable and class attribute/behavior(i.e. non-static vs. static members and methods). If they already have a background in C, concepts such as conditionals and looping won't be a big deal. Concepts such as "actions are being performed on an object" may.

    It's really benificial to explain extending as "is a special type of" and composition as "has a". Anyways... I'm babbling... but those are both pretty good books. Email me if you're interested in other issues.

    -Andy

  5. at my school.... by jeffy124 · · Score: 2

    The OO course came after a C++ course and a course on elementary data structures and algorithms. Chances are good that because your students know C, they probably have some familarity with the DS/A stuff.

    The books I had to get for my OOP course was Intro to Software Design by Steve Reiss, the Gamma et al Design Patterns book pointed out by others, and a reference book on UML.

    The software design book is a good intro for OOP. It teaches OO using C++ and also introduces UML. The later chapters aren't really necessary, IMHO. They go into designing GUIs, distributed systems, large systems, project management, and other things that are better left to a course on software engineering. If you do use Reiss's book, do what my prof did: ignore those chapters.

    The book did say it could be used for students with no C++ experience, and assumes to previous experience with classes, inheritance, etc. IIRC, there were was a chapter introducing the syntax of a class and stuff like that. It recommends a C++ reference to supplement the book if the students have had no C++ previously. I recommend Bjarne Stroustrup (sp??) The C++ Programming Language, a 1000+ page reference and specification on the entire language and the STL.

    --
    The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
  6. From my second year data structures class... by shaniber · · Score: 1
    Data Structures and Software Development in an Object Oriented Domain Eiffel Edition is a good book, and recently published. The authors used a pre-editted version on us in our data structures and algorithms class a few years ago. It gave a good introduction to OO programming, and did a good job at extending the principles that we had learned in our first year classes.

    I also know that they are working on a Java version of the book, that should be out Real Soon.

    Please note that the link I've given is to a Canadian bookseller, so it's aboot 30 bucks less for you yanks... :)

    --
    mah na mah na.
  7. good book, but out of print by dutky · · Score: 2

    If you can find a copy of it, C+C++: Programming with Objects in C and C++ by Allen Holub. The book gives a solid overview of object orientation, as well as examples of how to implement object oriented programming in ostensibly non-object oriented languages (in this case, standard C). Once it has introduced the basic OO concepts, and how you might implement them in a non-OO language, it goes on to show you how C++ delivers the same language features with much less hassle. As with other books by Allen Holub, this one is written with clarity and humor: it is both informative and enjoyable to read.

  8. Pathetic Nazis by Anonymous Coward · · Score: 0

    Check it out. For an ideology that worships power and seeks the destruction of the "weak" and "inferior" they sure seem like a tiny bunch of pathetic cry-babies.

    Never mind black vs. white, these guys are the sorriest excuse for white people. Why is it that only the stupidest, weakest, most fucked-up white people ever join these tiny "white supremicist" cults?

  9. Data Structures Book by idg101 · · Score: 1

    A book containing data structures may be good. It can actually show them the applications of OOP. A book that I use the cover an incredible about of material is An Introduction to Data Structures by Nyhoff. Very complete book, but way to much stuff to ever cover in one semester.

  10. Don't spend mondy - get review copies. by Doco · · Score: 1

    Talk to the department secretary and find out who the local salesperson is for the publishers of the texts you are looking at. OR just go to their website and surf to find the right salesperson.

    The book publishers are more than happy to send out a copy here or there to someone who is looking to choose a text for a college course. Think about it - it costs them $30 to give away a $60 book. IF it is chosen for the text then they sell 20-50 copies. If the profit for the publisher is only $10 per book that still leaves them a lot left over.

    My experience - I started teaching a class almost a year ago. It is my first teaching experience. Since then I have received 1 book that I specifically asked for and about 5 or 6 that just appeared in the mail for me. I know of some other professors who have asked for and received whole boxes of books.

    The sales guys did call the department secretary to verify that I was actually teaching the course I said I was, and since the saleman is local he knew the school and the departments, etc. So if you want to scam the publishers to try and get some textbooks for free you'll have to work at it a little bit.

    Of course, the cover will possibly be stamped "Review Copy - Not for Resale" which means you can't unload the extra copies for suplemental income. Which at the rate college profs get paid could be handy <-grin->

  11. Re:next... by Anonymous Coward · · Score: 0

    And you can't spell, that's for damn sure.

  12. Recommended Book by walt_r · · Score: 1

    Design Patterns Explained: A New Perspective on Object-Oriented Design by Alan Shalloway, James R. Trott This book is excellent. It talks about the use design patterns as a key OO technique in a very easy-to-read manner. The book also explains the differences in meanings of terms used in Gamma et al's "Design Patterns" and Martin Fowler's "UML Distilled" ("Design Patterns" was written before UML was developed). And while "Design Patterns" says things in a prescriptive manner: "favour composition over inheritance" this book gives examples as to why over-use of inheritance is bad. The concept of design patterns introduce a "new" way of thinking about OO design and programming. Older books and techniques tended to promote inheritance.

  13. Try to teach with an OO Language by JamesOfTheDesert · · Score: 1
    If at all possible, try to teach the course using something like Smalltalk or Ruby., i.e., an OO language where everything really *is* an object.

    Using C or C++ will let procedural programming thinking creep in. Using Java will frustrate people when, as they starting thinking in objects, find they can't call, say myInteger.abs() but instead have to start using procedural library calls like Math.abs(myInteger).

    --

    Java is the blue pill
    Choose the red pill
  14. Free (online) text on C++ by drauh · · Score: 1

    There's a great free text on C++ online, with a decent intro to OOP. I was able to understand Stroustrup much better after going through this.

    For generic OOD, I really liked Booch's Object-Oriented Analysis and Design with Applications (ISBN 0805353402).

    --
    This is a tautology.
  15. The Object-Oriented Approach by fooguy · · Score: 1

    I've taken a design course here which teaches fundamentals in psuedo code. We covered both structured programming and OOP. While this book is *very* English like, it does a good job of scratching the surface.

    I think you'll find it's easier to teach OOP if the students understand structured programming first.

    --
    "All I ever wanted was to see Larry Wall give Bill Gates a Perl necklace."
    http://www.eisenschmidt.org/jweisen