Hello Everyone!
Can Anyone Help me please?
So Im trying to get a value from a class to another class.
So this one complies but does not show what i want.
idk what is wrong and couldnt figure it out for like hours. :(
in the main it lets user to make two points and from that it creates
offices.
And im trying to get a,x,y values from Office and then use it in the Courses.
PS this is just a part of my program that i dont get.
Are the data members of Office private? If so, that's good - they probably should be private. But if you want other classes to be able to get the values of those data members, then you'll need to write some accessor methods on the Office class to obtain them.
Also, what's going on in your constructor for Course? You declare a load of local variables, and initialise one of them, but you never use them.
> Also, what's going on in your constructor for Course?
stack overflow. The default constructor is creating object of that class using the default constructor.