object-oriented design in object-oriented designthe black boxes are objects the magic behind objects lies in class definitions once suitable class definition has been writtenwe can completely ignore how the class works and just rely on the external interface--the methods this is what allows you to draw circles in graphics windows without so much as glance at the code in the graphics module all the nitty-gritty details are encapsulated in the class definitions for graphwin and circle if we can break large problem into set of cooperating classeswe drastically reduce the complexity that must be considered to understand any given part of the program each class stands on its own object-oriented design is the process of finding and defining useful set of classes for given problem like all designit is part art and part science there are many different approaches to oodeach with its own special techniquesnotationsgurusand textbooks can' pretend to teach you all about ood in one short on the other handi' not convinced that reading many thick volumes will help much either the best way to learn about design is to do it the more you designthe better you will get just to get you startedhere are some intuitive guidelines for object-oriented design look for object candidates your goal is to define set of objects that will be helpful in solving the problem start with careful consideration of the problem statement objects are usually described by nouns you might underline all of the nouns in the problem statement and consider them one by one which of them will actually be represented in the programwhich of them have "interestingbehaviorthings that can be represented as primitive data types (numbers or stringsare probably not important candidates for objects things that seem to involve grouping of related data items ( coordinates of point or personal data about an employeeprobably are identify instance variables once you have uncovered some possible objectsthink about the information that each object will need to do its job what kinds of values will the instance variables havesome object attributes will have primitive valuesothers might themselves be complex types that suggest other useful objects/classes strive to find good "homeclasses for all the data in your program think about interfaces when you have identified potential object/class and some associated datathink about what operations would be required for objects of that class to be useful you might start by considering the verbs in the problem statement verbs are used to describe actions--what must be done list the methods that the class will require remember that all manipulation of the object' data should be done through the methods you provide refine the nontrivial methods some methods will look like they can be accomplished with couple of lines of code other methods will require considerable work to develop an algorithm use top-down design and stepwise refinement to flesh out the details of the more difficult methods as you go alongyou may very well discover that some new interactions with other classes are neededand this might force you to add new methods to other classes sometimes you may discover need for brand-new kind of object that calls for the definition of another class