Hi all,
I have a simple question that I can't find the answer to
i'm using the following
Exam.java (interface)
ExamImpl.java (implementation)
ExamFactory.java (interface)
ExamFactoryImpl.java (implementation)
The ExamFactory interface says the newExam() method return type is "Exam"
The ExamFactoryImpl code currently returns "ExamImpl"
Is this a problem??
i.e. Are Exam and its implementation the same thing??
public interface ExamFactory extends java.rmi.Remote {
public Exam newExam(String examName) throws RemoteException;
public Exam getExam(String examName) throws RemoteException;
}
// ExamFactoryImpl.java
public ExamImpl newExam(String exam_name) { // Asks factory for new exam
ExamImpl exam = new ExamImpl(exam_name);
exams.addElement(exam);
return exam;
}
Thanks
Mark