by guyrap - Sunday, 28 December 2008 14:47:28
Hello,
As I must construct (in my main() SimStarter class) a CallsFactory to pass on to the CallsRouter, I must have some common name for it, similar to the name you'll use for your CallsFactory class...
How should I name it? I can't just "CallsFactory cf = new CallsFactory()" as CallsFactory is a reserved word (due to the fact that there's an interaface with that same name included in the project).
Anyone?
As I must construct (in my main() SimStarter class) a CallsFactory to pass on to the CallsRouter, I must have some common name for it, similar to the name you'll use for your CallsFactory class...
How should I name it? I can't just "CallsFactory cf = new CallsFactory()" as CallsFactory is a reserved word (due to the fact that there's an interaface with that same name included in the project).
Anyone?
Re: CallsFactory class must be named diffrently from CallsFactory interface - so how to name it?
by adamy - Sunday, 28 December 2008 16:37:20
First, you have the example call factory supplied with the assignment so you can use:
CallsFactory cf = new ExampleCallFactory();
Otherwise, it's a common convetion to use implement concrete classes as the interface name followed by Impl (as in implmentation), like so:
CallsFactory cf = new CallsFactoryImpl();
But again, you can just the ExampleCallFcatory you already have.
CallsFactory cf = new ExampleCallFactory();
Otherwise, it's a common convetion to use implement concrete classes as the interface name followed by Impl (as in implmentation), like so:
CallsFactory cf = new CallsFactoryImpl();
But again, you can just the ExampleCallFcatory you already have.
![[-]](/~ygleyzer/course.wiki/images/button-minus.gif)