And I'f I would like to call the functions from the main section, for
goods g;
(and I'd like to set "g.name", and after thet get(read) "g.name), how would that look?
Yes,but you should make the name be public not private,and that's not safe,
everybody could change the value of name.
that's why I'm using set/get methods to do so. the thing that I don't know is how to calm the from the main function.
How should I get the name, for example of: "g.name", using the GET function?
is that g.name.getAvtor();
or ..?
If your name is public defined, you can use g.name=" your name", otherwise you should get it by function Getname()
Last edited on