diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-05-01 11:41:09 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-01 11:41:09 +0200 |
commit | af21afd482a358ff206872de3e5ce3d8ab249c05 (patch) | |
tree | 2efa2f184981ef5cdd10064e4b5c874e780bf506 /src | |
parent | 7866f2f05e72b3eef1c593d63730d9b74b4dc3c8 (diff) |
have methods in abstract class Storage throw exception (not abstract methods)
Diffstat (limited to 'src')
-rw-r--r-- | src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java | 55 |
1 files changed, 44 insertions, 11 deletions
diff --git a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java index 95e5851..5eff376 100644 --- a/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java +++ b/src/dk.biks.bachelorizer/dk/biks/bachelorizer/Storage.java @@ -14,57 +14,90 @@ abstract class Storage { Storage() { } /// initialization as needed - abstract void initialize(); + void initialize() { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// add student /// /// @param name Name of student - public abstract void addStudent(String name); + void addStudent(String name) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// get student name /// /// @return name of student - public abstract String getStudentName(); + String getStudentName() { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// resolve activity index from name /// /// @param name activity name /// @return index of activity as integer - abstract int getActivityIndeks(String name); + int getActivityIndeks(String name) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// insert activity into participation /// /// @param activityIndex index of activity - abstract void addParticipation(int activityIndex); + void addParticipation(int activityIndex) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// list currently participating activities /// /// @param program programme name /// @return names of participating activities - abstract ArrayList<String> getParticipation(String program); + ArrayList<String> getParticipation(String program) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// purge participation choices - abstract void clearParticipation(); + void clearParticipation() { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// list activities within a program /// /// @param program programme name /// @return names of contained activities - abstract ArrayList<String> selectProgram(String program); + ArrayList<String> selectProgram(String program) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// sum of ECTS points under the given category /// /// @param program programme name /// @return ECTS points as String - abstract String getSumEcts(String program); + String getSumEcts(String program) { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// list of available subject modules /// /// @return names of all subject modules as list of strings - abstract List<String> getAllSubjects(); + List<String> getAllSubjects() { + throw new UnsupportedOperationException( + "Not implemented yet"); + } /// list of available activities /// /// @return names of all activities as list of strings - abstract ArrayList<String> getAllActivities(); + ArrayList<String> getAllActivities() { + throw new UnsupportedOperationException( + "Not implemented yet"); + } } |