开发者

What is a good visual tutorial of OOP? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_Python百科 Closed 10 years ago.

I don't work at a software company, but have taught myself C# and have been using it fairly regularly. Now another engineer in the office (not a software engineer) has expressed an interested in learning to code like I can. I'm helping him through some simple console applications, but he's having some trouble grasping all the OOP concepts. He's an engineer so he's had experience with procedural programing in school, but the concept like objects, classes and instances are really challenging him.

I suggested he get the Head First C# book, but I was also wondering if anyone knew of any good tutorials on line that explained OOP principles. He's using C# but it really could be language agnostic. Also something with a lot of pictures and diagrams would be the most helpful.


I don't know how much he knows already, but I remember having a hard time switching from procedural to OO too. It took me a long time to figure out (in VB that was) Label1.Caption = TextBox1.Text but once I got that, a whole new world opened before me, although it took a while to get to actually creating classes and think about stuff like inheritance.

I don't know a book, but if this guy knows procedural programming and he's struggling with the same concept as I mentioned above, maybe a few metafores could help. It's almost as good as a diagram, or even better. ;)

If you compare an object to a device, let's say a cell phone, it would make sense how each different cell phone is an instance, while all cell phones of the same model have the same class. Accordingly, the buttons and/or the software on it could be seen as methods. You got a method dial(phonenumber), and you got properties, like a list of contacts. Each phone of the same class has the same properties, although the values can differ. Everyone's got different contacts in their phone book.

This is just a silly metafore, but I'm sure you can make up some other ones for other OO concepts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜