Check out my blog on software development: http://www.turnleafdesign.com
Could you tell me what you mean by 'member' variable? Is it a synonym for instance variable?
R6i
Christopher Laurenzano wrote:Also -- where should the getter and setter methods go -- can it be an any class or not?
I don't quite understand the difference between the getter and setter methods and why they're used -- they both give a value.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
_rohith
Check out my blog on software development: http://www.turnleafdesign.com
I don't quite understand the difference between the getter and setter methods and why they're used
I noticed as well that the void modifier for the methods still produce a value, so what is the difference between that and using a return value?
Geo Kinkladze wrote:in the printout method instead of having this:
you should have this:
and this uses your getter method.
Check out my blog on software development: http://www.turnleafdesign.com
By the way: "void" isn't called a modifier, but a return type. Modifiers include public final private and static, but not void.the void modifier for the methods still produce a value
Space pants. Tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
|