PDA

View Full Version : what is the purpose is isopen() in main menu,difining select, move, rotate functions



saneha
04-29-2011, 08:02 AM
what is the purpose is isopen() in main menu and why we are difining select, move, rotate functions in main menu and in view and shape again and again.

Vuhelper
04-29-2011, 08:02 AM
sopen() is a boolean function whose purpose is just to return “yes” or no”. If menu is open then it sets to “yes” and if it’s not open then, it sets to “no”. This concept is taken from Domain Knowledge.

Secondly, as you are well aware about the relationship extracted from problem statement as well as from domain knowledge among different classes involved in this OO model.
So, on the basis of those relationship, it is seen that select, rotate and move (functions) are used by different classes like “menu”, View” and “shape” as per requirements through their objects.
Dear student, its an Object Model whose basic purpose is to highlight different classes and their related relationship in actual. So, its not necessary that all said functions are defined in all above mentioned classes, it is possible that these functions are defined in a single class , where as other classes just has as references.