Anonymous user
Keyword: attribute: Difference between revisions
m
no edit summary
*>Monkey 05 06 mNo edit summary |
*>Monkey 05 06 mNo edit summary |
||
Line 121: | Line 121: | ||
Display("Weapon name: %s", sword.Name); // calls sword.get_Name() automatically | Display("Weapon name: %s", sword.Name); // calls sword.get_Name() automatically | ||
sword.Damage = 5; // calls sword.set_Damage(5) automatically | sword.Damage = 5; // calls sword.set_Damage(5) automatically | ||
sword.Price -= 50; // calls sword. | sword.Price -= 50; // calls sword.set_Price(sword.get_Price() - 50) automatically | ||
''Well that's easy! ...but what about these get and set methods...I don't want the user to know about them.'' | ''Well that's easy! ...but what about these get and set methods...I don't want the user to know about them.'' |