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.
Inheritance and function arguments taking objects
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Inheritance and function arguments taking objects
You can if they are public, or have getters/setters. Have you tried it? Things like this are very easy to test...
(#10850)