   OOP for starters?
  I am new new in OOP stuff.I have read the Herbert Schildt's C++ reference.But it just gave me the idea, about how it work.Not how to make it work.I am read few chapters from "Object-Oriented Programming in C++ by Robert Lafore"(old edition featuring UML 1, i guess).But it was just an good overview.I am still in the dark.I dont know how to effectively design or implement OOP context.I am trying to come up with some design, but they all were bad.Where can I have tutorials on OOP design.I mean, a problem described and coded from the scratch and providing a greater insight about how to do things like that on my own.Is there any good book, which is smart enough to enlighten an amateur, to make him able to come up with a standerd OOP design.   
  The book that really opened my eyes to what OOP programming looks like was Design Patterns. It's old, but it's a classic, and still highly relevant. It's basically an examination of a bunch of classic OO solutions to traditional software development problems. Highly recommended.I should mention, though, that OOP is just one way to attack programming problems. There are many others, and which method is best will depend on context.   ;  Object oriented design is an art. Like any art, to master it you must practice. You say that "all your designs were bad". Good, then you learned something. You hopefully won't make the same mistakes again. Chances are your next design, and the one after that, will be bad, too. Once again, every time you recognize your failures you have learned to avoid them the next time. That said, you should of course read about some core principles as well:Open/Closed PrincipleLiskov Substitution PrincipleSingle Responsibility PrincipleThe list is by no means exhaustive, but it should serve as a good starting point.   ;  I get it, but I need a problem in front of me which I have to solve.Then I need to have a good a solution of that problem, to compare with my solution.Then I will be able to understand my weakness or limitations.I also need some explanation of the solved problem, how he did it in this way, why this is approach is better then the other...etc etc.So, is there any book or online materials like that, from where I can start practicing?My one month summer vacation has started and I wanna grab a strong understanding about OOP within this one month and I am willing to work very hard for it.Already I have collected some books("Object-Oriented Design Heuristics by Arthur J. Riel" "UML Distilled - A Brief Guide to the Standard Object Modeling Language, Third Edition by Martin Fowler." and "Design Patterns Element Of Reusable Object Oriented Software by Erich Gamma (Author), Richard Helm (Author), Ralph Johnson (Author), John M. Vlissides") from college library...But when I started reading those, I realized that they are going to provide me theoretical insight but no practical(example by example by hand) experience.I know they are important, but still, if i continue reading these books, then after this one month vacation i will learn a lot about different theories and other stuff's about OOP...but, I wont be able to code a working and satisfying OOP design.   ;  Maybe the challenges at http://www.cprogramming.com/helpfree.html would be of use to you. Just try to make your design fully object oriented if that's what you want to practice. I'm pretty sure their solutions are just programs that get the job done, so I don't think they propose a "good" OO design. Still, it is experience. Maybe google "object oriented programming challenge" or "c++ challenge".[edit]Oh, I also stumbled across this: http://www.e-booksdirectory.com/details.php?ebook=1066It's a free e-book that seems (I haven't read any) to be what you're looking for. I am going to read through it, and I'll post back my findings if anyone cares.[Edited by - nar1nk on June 3, 2010 9:26:03 AM];Quote:Original post by nar1nkMaybe the challenges at http://www.cprogramming.com/helpfree.html would be of use to you. Just try to make your design fully object oriented if that's what you want to practice. I'm pretty sure their solutions are just programs that get the job done, so I don't think they propose a "good" OO design. actually, I have already solved some of those problem.Not in OOP manner but, as you have said the are too straight forward and dont serve as a good sample.and about the book, I will be looking for your consent. :);  So far it seems to be pretty good. The book presents and discusses the problem, and then moves from there towards a solution. I haven't quite wrapped up a solution, but the approach seems like it is exactly what you were looking for.Read the why read section of the preface.   ;Quote:Original post by WindryderThat said, you should of course read about some core principles as well:Open/Closed PrincipleLiskov Substitution PrincipleSingle Responsibility PrincipleThe list is by no means exhaustive, but it should serve as a good starting point.They're part of a group of five patterns known as SOLID which are simple principles by which maintainable OO code can be made without doing the arduous heavy design phase; all part of being agile and pragmatic.Quote:Original post by nar1nkI'm pretty sure their solutions are just programs that get the job done, so I don't think they propose a "good" OO design. Still, it is experience. Maybe google "object oriented programming challenge" or "c++ challenge".Those problems don't lend themselves particularly well to OO-ification and are much better off implemented procedurally. It might be a good exercise to implement them using generic programming perhaps as they are much better suited to that.Have you considered picking a project, implementing it in OO as you see it and then posting it here on GDNet to get feedback and improvements? Assuming you don't simply post a mass of unstructured code and put the effort in to explain to us what's going on, then people generally are willing to get nitty gritty with how stuff could be done better. As well as answering any specific questions you might come up with along the way as your brain considers alternative designs and  it often isn't obvious which is best without prior experience.   ;  do codechef.com problems   ;Quote:Original post by iamcreasyI am new new in OOP stuff.I have read the Herbert Schildt's C++ reference.!Throw that away, burn it, and read something else. Anything else.Herbert Schildt is famous for saying things about C and C++ that are just plain wrong. So much so that slang terms are constructed to mock him.   