- java.lang.Object
-
- services.SuggestionCommitteeService
-
- All Implemented Interfaces:
ISuggestionCommitteeService
public class SuggestionCommitteeService extends java.lang.Object implements ISuggestionCommitteeService
SuggestionCommitteeService
implementsISuggestionCommitteeService
interface
-
-
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 SuggestionCommitteeService()
Construct an instance ofSuggestionCommitteeService
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deleteSuggestion(Suggestion suggestion)
Deletes the specified suggestion.boolean
editSuggestion(Suggestion suggestion, java.lang.String newQuestion)
Edits the specified suggestion with a new question.boolean
submitSuggestions(Camp camp)
Submits a suggestion for the specified camp.java.util.ArrayList<Suggestion>
viewAllSuggestions()
Retrieves a list of all suggestions.java.util.ArrayList<Suggestion>
viewProcessingSuggestions()
Retrieves a list of processing suggestions.
-
-
-
Constructor Detail
-
SuggestionCommitteeService
public SuggestionCommitteeService()
Construct an instance ofSuggestionCommitteeService
-
-
Method Detail
-
viewAllSuggestions
public java.util.ArrayList<Suggestion> viewAllSuggestions()
Description copied from interface:ISuggestionCommitteeService
Retrieves a list of all suggestions.- Specified by:
viewAllSuggestions
in interfaceISuggestionCommitteeService
- Returns:
- An
ArrayList
ofSuggestion
objects representing all suggestions.
-
viewProcessingSuggestions
public java.util.ArrayList<Suggestion> viewProcessingSuggestions()
Description copied from interface:ISuggestionCommitteeService
Retrieves a list of processing suggestions.- Specified by:
viewProcessingSuggestions
in interfaceISuggestionCommitteeService
- Returns:
- An
ArrayList
ofSuggestion
objects representing processing suggestions.
-
submitSuggestions
public boolean submitSuggestions(Camp camp)
Description copied from interface:ISuggestionCommitteeService
Submits a suggestion for the specified camp.- Specified by:
submitSuggestions
in interfaceISuggestionCommitteeService
- Parameters:
camp
- TheCamp
object for which the suggestion is submitted.- Returns:
true
if the suggestion is submitted successfully,false
otherwise.
-
editSuggestion
public boolean editSuggestion(Suggestion suggestion, java.lang.String newQuestion)
Description copied from interface:ISuggestionCommitteeService
Edits the specified suggestion with a new question.- Specified by:
editSuggestion
in interfaceISuggestionCommitteeService
- Parameters:
suggestion
- TheSuggestion
object to be edited.newQuestion
- The edited suggestion.- Returns:
true
if the suggestion is edited successfully,false
otherwise.
-
deleteSuggestion
public boolean deleteSuggestion(Suggestion suggestion)
Description copied from interface:ISuggestionCommitteeService
Deletes the specified suggestion.- Specified by:
deleteSuggestion
in interfaceISuggestionCommitteeService
- Parameters:
suggestion
- TheSuggestion
object to be deleted.- Returns:
true
if the suggestion is deleted successfully,false
otherwise.
-
-