C# 2008 For Dummies by Stephen R. Davis & Chuck Sphar

C# 2008 For Dummies by Stephen R. Davis & Chuck Sphar

Author:Stephen R. Davis & Chuck Sphar
Language: eng
Format: epub
Publisher: Wiley Publishing, Inc.


Preparing object-oriented nachos

In an object-oriented approach to making nachos, I would first identify the types of objects in the problem: chips, beans, cheese, jalapeños, and an oven. Then, I would begin the task of modeling those objects in software, without regard for the details of how they will be used in the final program. For example, I can model cheese as an object pretty much in isolation from the other objects, and then combine it with the beans, the chips, the jalapeños, and the oven and make them interact. (And I may decide that some of these objects don’t need to be objects in the software: cheese, for instance.)

While I do that, I’m said to be working (and thinking) at the level of the basic objects. I need to think about making a useful oven, but I don’t have to think about the logical process of making nachos — yet. After all, the microwave designers didn’t think about the specific problem of my making a snack. Rather, they set about solving the problem of designing and building a useful microwave.

After I have successfully coded and tested the objects I need, I can ratchet up to the next level of abstraction. I can start thinking at the nacho-making level, rather than the microwave-making level.

At this point, I can pretty much translate my son’s instructions directly into C# code.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.