- java.lang.Object
-
- services.EnquiryStudentService
-
- All Implemented Interfaces:
IEnquiryStudentService
public class EnquiryStudentService extends java.lang.Object implements IEnquiryStudentService
EnquiryStudentService
implemetsIEnquiryStudentService
interface and provide enquiry related functions for a student user for selected camp
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Scanner
sc
Scanner
object to get input from user
-
Constructor Summary
Constructors Constructor Description EnquiryStudentService()
Construct an instance ofEnquiryStudentService
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deleteEnquiry(Enquiry enquiry)
Deletes a specific enquiry.boolean
editEnquiry(Enquiry enquiry, java.lang.String newQuestion)
Edits the content of an existing enquiry.boolean
submitEnquiry(Camp camp)
Submits a new enquiry for a specific camp.java.util.ArrayList<Enquiry>
viewAllEnquiries()
Retrieves a list of all enquiries made by the student.java.util.ArrayList<Enquiry>
viewProcessingEnquiries()
Retrieves a list of processing enquiries made by the student.
-
-
-
Constructor Detail
-
EnquiryStudentService
public EnquiryStudentService()
Construct an instance ofEnquiryStudentService
-
-
Method Detail
-
viewAllEnquiries
public java.util.ArrayList<Enquiry> viewAllEnquiries()
Description copied from interface:IEnquiryStudentService
Retrieves a list of all enquiries made by the student.- Specified by:
viewAllEnquiries
in interfaceIEnquiryStudentService
- Returns:
- An
ArrayList
ofEnquiry
containing all enquiries made by the student.
-
viewProcessingEnquiries
public java.util.ArrayList<Enquiry> viewProcessingEnquiries()
Description copied from interface:IEnquiryStudentService
Retrieves a list of processing enquiries made by the student.- Specified by:
viewProcessingEnquiries
in interfaceIEnquiryStudentService
- Returns:
- An
ArrayList
ofEnquiry
containing processing enquiries made by the student.
-
submitEnquiry
public boolean submitEnquiry(Camp camp)
Description copied from interface:IEnquiryStudentService
Submits a new enquiry for a specific camp.- Specified by:
submitEnquiry
in interfaceIEnquiryStudentService
- Parameters:
camp
- The camp for which the enquiry is submitted.- Returns:
true
if the enquiry is successfully submitted,false
otherwise.
-
editEnquiry
public boolean editEnquiry(Enquiry enquiry, java.lang.String newQuestion)
Description copied from interface:IEnquiryStudentService
Edits the content of an existing enquiry.- Specified by:
editEnquiry
in interfaceIEnquiryStudentService
- Parameters:
enquiry
- The enquiry to be edited.newQuestion
- The edited enquiry.- Returns:
true
if the enquiry is successfully edited,false
otherwise.
-
deleteEnquiry
public boolean deleteEnquiry(Enquiry enquiry)
Description copied from interface:IEnquiryStudentService
Deletes a specific enquiry.- Specified by:
deleteEnquiry
in interfaceIEnquiryStudentService
- Parameters:
enquiry
- The enquiry to be deleted.- Returns:
true
if the enquiry is successfully deleted,false
otherwise.
-
-