Page 1 of 1

Inheritance and function arguments taking objects

Posted: Thu Jun 19, 2008 12:00 pm
by valaris
I was wondering if this would work or be at all practical. I have a class that sets up my sql connection, and performs queries/returns results called System, and another class that extends it Login, that will log a user in. A third class that will get info about a user takes an object as an argument, specifically a Login object. Now in my third class can I call on my object variables of type system that are declared in my Login object that i passed to my third object?

Hopefully im not too confusing.

Thanks.

Re: Inheritance and function arguments taking objects

Posted: Thu Jun 19, 2008 12:59 pm
by Christopher
You can if they are public, or have getters/setters. Have you tried it? Things like this are very easy to test...