Project 14 Question

2 views
Skip to first unread message

William Ingold

unread,
Jul 29, 2011, 1:52:49 PM7/29/11
to byu-142-s...@googlegroups.com
Does Rob want the classes to simply implement one class.
Then in a driver declare the objects as the class
Example:

Interface x = new y();

Or is

Y x = new Y();
fine too?

Sarah Morley

unread,
Jul 29, 2011, 1:56:06 PM7/29/11
to byu-142-s...@googlegroups.com
I'm pretty sure he wants:

Interface x = new Y();

"You instantiated your interface with at least two different classes"

If you said Y x = new Y() that doesn't seem like it'd be "instantiating your interface". That'd be instantiating Y.

Sarah
Reply all
Reply to author
Forward
0 new messages