[CT414]: Add Assignment 1

This commit is contained in:
2025-01-23 01:26:41 +00:00
parent d4d9ec6f1f
commit 629549d50f
9 changed files with 242 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package interfaces;
import java.rmi.*;
public interface ApplicationForm extends Remote {
// method to retrieve general information about the form
String getFormInfo() throws RemoteException;
// method to retrieve the total number of questions in the application form
int getTotalQuestions() throws RemoteException;
// method to retrieve a specific question based on its number
String getQuestion(int questionNumber) throws RemoteException, IllegalArgumentException;
// method to provide a String answer to a question based off its questionNumber
void answerQuestion(int questionNumber, String answer) throws RemoteException, IllegalArgumentException;
}

View File

@ -0,0 +1,14 @@
package interfaces;
import exceptions.InvalidCredentialsException;
import exceptions.InvalidSessionIDException;
import java.rmi.*;
public interface ApplicationHandler extends Remote {
long login(String username, String password) throws RemoteException, InvalidCredentialsException;
ApplicationForm downloadApplicationForm(long sessionID) throws RemoteException, InvalidSessionIDException;
void submitApplicationForm(long sessionID, ApplicationForm applicationForm) throws RemoteException, InvalidSessionIDException;
}