OOP - objects and instances -


this question has answer here:

i have seen lot of posts objects, classes , instances , have become little confused. need clarification following example.

say create game, has 3 menus:

  • main menu,
  • level menu
  • option menu.

now define class called gamemenu since these menus have titles , instructions , buttons etc... instantiate menus using class example:

mainmenu = gamemenu(); levelmenu = gamemenu(); optionmenu = gamemenu(); 

and pass parameters titles , button labels , such inside brackets - in context of example right in saying class gamemenu, objects collectively mainmenu, levelmenu , optionmenu, , instances 1 specific object mainmenu instance, optionmenu instance , levelmenu instance.

that taught, means objects , instances exact same things in case terms object , instance synonyms each other not have read?

long story short, object , instance terms synonyms?

an object instance of class


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -