ClassRepo

Introduction

This portfolio highlights my contributions to a team software development project. After almost 12 weeks of advancements, we have created ClassRepo, which is an all-in-one school management system.

More About ClassRepo

ClassRepo is an enhanced AddressBook application, which is targeted at secondary schools to provide them with an easy and effective learning management system. Our aim is to help the students, teachers and the admin personnel in secondary schools by bolstering their efficiency. Spending less time on mundane tasks such as attendance taking would mean an increase in time available for actual learning to take place. With this goal in mind, our app targets 5 key areas, namely privilege (to ensure data security), exams, assessments & grades, fees and attendance. The users can interact with our app using a CLI. The application also has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.

How Did I Contribute?

  • Code Contributed - RepoSense

  • Major Enhancements: Added the Assessments/Grades Feature

    • Able to add/list/delete assessments

    • Able to add/view/delete grades for students individually, for specific assessments

    • Able to add/list/delete statistics for any assessment (stored in separate statistics book)

      What It Does: Allows the user (either teachers/ admin) to maintain a list of all assessments in the school. Grades for these assessments can be added to students individually. Finally, the user can also add statistics for each assessment such as average score, max/min score etc. These statistics will be stored in a separate statistics book.
      Justification: This model allows the grades of all students for a particular assessment to be stored together, while making it easier for user to add grades based on assessment. Since the ClassRepo is designed for secondary schools, this feature will ensure that all teachers and admin are up-to-date with all the assessments being conducted and the corresponding statistics.
      Highlights: This enhancement is multifaceted and requires addition of new commands as well as careful modification to existing ones. The implementation requires meticulousness to ensure that the code is well-integrated and runs smoothly without any bugs.
  • Minor Enhancement: Added functions to allow statistics such as average grade for each assessment to be calculated automatically, so manual work required by the user is reduced.

  • Other Contributions:

    • Project Management

      • ROLE: Deliverable and deadlines in-charge - Managed Issue Tracker on GitHub, Set milestones for own features, deadlines for groups, labels and so on.

    • Documentation:

      • Tweaked contents of User Guide and Developer Guide to fit our project. Contributed to 'About Us' page.

    • Community:

      • PRs reviewed (with non-trivial review comments): #159, #157, #86, #168

      • Reported bugs and suggestions for teammates: #173

      • Reported bugs and suggestions for other teams in the class: #125, #89, #94, #108

Contributions to the User Guide

Attached below is a link to the sections I contributed to the User Guide of our project.

Grade Commands

Below are the commands that deals with grades/assessments of students:

Adding an Assessment : addassess 16

Adds an assessment to the address book.
Format: addassess ASSESSMENT_NAME

Words in UPPER_CASE are the parameters. There is only one parameter for this command, which is the exam or assessment name. Duplicate assessments cannot be added.

Example(s):

  • addassess CG2271 Midterm

  • addassess Mathematics final class test

Listing all assessments : listassess 16

Shows a list of all assessments in the address book, along with an index for each
Format: listassess

Deleting an assessment : deleteassess 16

Deletes the specified assessment from the assessment book, based on the index. Irreversible.
Format: deleteassess INDEX

Deletes the assessment at the specified INDEX. The index refers to the index number shown in the most recent assessments listing.

Example(s):

  • listassess
    deleteassess 1

Adding grades to a person : addgrades 16

Adds grades to selected student/person for a specific assessment listed in addressbook.
Format: addgrades PERSON_INDEX ASSESSMENT_INDEX GRADES

Words in UPPER_CASE are the parameters. There are three parameters for this command, which are the index of the person or student, index of the appropriate assessment and the grades themselves.
1. No restriction on upper limit! It is up to the teacher to decide what the total marks are.
2. In case of any mistake in the entry or necessity to update the grade, you can overwrite a previously entered value by simply using the same function again!
addgrades PERSON_INDEX ASSESSMENT_INDEX UPDATED_GRADES

Example(s):

  • list
    listassess
    addgrades 1 1 89

Viewing grades of a person : viewgrades 16

View the grades for all assessments of a selected student/person.
Format: viewgrades PERSON_INDEX

Words in UPPER_CASE are the parameters. There is only one parameter for this command, which is the index of the person or student whose grades you want to view. This is based on the index number shown in the most recent person listing.
Using list command

Example(s):

  • list
    viewgrades 1
    The results will be displayed as a list of assessments the student has taken and their corresponding grades.

Deleting a grade : deletegrades 16

Deletes the specified assessment and respective grades of a particular student. It is irreversible.
Format: deletegrades PERSON_INDEX ASSESSMENT_INDEX

Deletes grades for the specified PERSON_INDEX and their respective assessment at the specified ASSESSMENT_INDEX. The index refers to the index number shown in the most recent person and assessments listing respectively.

Example(s):

  • list
    listassess
    deletegrades 1 2
    listassess — Check the updated list
    Deletes the grades corresponding to the 2nd assessment in the address book for the student at index 1 in the address book.

Adding a statistic : addstatistics 16

Adds a statistic to the statistics book.
Format: addstatistics ASSESSMENT_INDEX

Words in UPPER_CASE are the parameters. There is only one parameter for this command which is the assessment index as shown in the most recent assessments listing.

This command automatically calculates and adds statistics for a given assessment based on all the grades or scores previously entered to students for that particular assessment. These statistics include:
1. Average Score
2. Total Number of Exam Takers
3. Maximum Score
4. Minimum Score

Example(s):

  • listassess

  • addstatistics 1

If you change/ update grades after already generating a statistic, you must delete that statistic and re-add it to the statistics book to ensure that it is up to date.

Listing all statistics : liststatistics 16

Shows a list of all statistics in the statistics book, along with an index for each
Format: liststatistics

If you delete an assessment after generating its statistics, this statistic will still remain in the statistics book. This is to ensure that the school can maintain a record of all its statistics over time if needed, even though the assessment may have ended and the grades are awarded to students. It is up to the school to decide how long they want to store their statistics for.

Deleting a statistic : deletestatistics 16

Deletes the specified statistic from the statistics book, based on the index. Irreversible.
Format: deletstatistics INDEX

Deletes the statistic at the specified INDEX. The index refers to the index number shown in the most recent statistics listing.

Example(s):

  • liststatistics
    deletestatistics 1

Contributions to the Developer Guide

Attached below is a link to the sections I contributed to the Developer Guide.

Grades Feature

Current Implementation

There is a master StatisticsBook which contains all the statistics for various exams. There is also a list of assessments and the grades for these assessments being stored in the AddressBook. The current set of commands include:

  1. Adding a new assessment

  2. Listing all assessments

  3. Deleting an assessment

  4. Adding grades for a student

  5. Viewing all grades for a student

  6. Deleting a specific grade for a student

  7. Adding statistics for an assessment

  8. Listing all statistics

  9. Deleting a statistic

This is the class diagram for the assessments, grades and statistics combined:

AssessmentClassDiagram
Figure 1. Class Diagram
  1. A list of unique assessments can be stored in the AddressBook.

  2. Each assessment object contains a Hash Map, with Person as the Key and Grades as the Value. Hence, the grades of all students for a particular assessment will be stored together in the same HashMap.

  3. Each person object (or student) can have a list of assessments and respective grades under it. This makes sense logically since a student will have multiple assessments throughout the school year.

  4. Statistics can be added for an existing assessment. The grades stored in the HasHMap will be used to calculate various stats such as average score, total exam takers, max score and min score.

  5. This list of statistics is stored in the statisticsbook.

An Example of how feature 2 - Adding a new assessment to the AddressBook works:

  1. The user (teacher/ admin) will be able to use the 'addassess' command to add a new assessment.

  2. This assessment will only be added to the AddressBook if it is not already present. i.e. check for duplicate assessments is done.

  3. These assessments reflect the exams/homework of the school in general. This list of assessments can then be used to add grades to a particular student.

This is demonstrated by the following sequence diagram:

Assessment Seq Diagram
Figure 2. Sequence Diagram of adding a new assessment

Design Considerations

Aspect: 'Assessment' and 'Grades' as separate classes
  • Alternative 1 (current choice): Assessments and Grades are created as two separate classes. Assessment class stores the grades of all students for that assessment in a HashMap, where the Person (or student) is the key.

    • Pros: Better design in terms of OOP. Allows easier calculation of statistics per assessment as you can simply loop through all the grades. It is also a good model of the real world where all grades for an assessment will be stored together.

    • Cons: This is a little more tedious in terms of coding.

  • Alternative 2: The Assessment and Grades are combined into a single class with different parameters to take in the exam name and grade respectively.

    • Pros: - Storage of the data becomes a little easier and you can just store a list of grades added to each person.

    • Cons: Cannot view the list of assessments separately. This architecture does not make sense in terms of modelling how grades are stored in the real world.

Aspect: Data structure to store grades
  • Alternative 1 (current choice): The grades are stored using a Map data structure under Assessment class

    • Pros: Allows easy reference to person class.

    • Cons: Cannot sort/ order the entries if required.

  • Alternative 2: The grades are stored using a 'List' data structure under Assessment class

    • Pros: Can sort the grades alphabetically if required.

    • Cons: Difficult to link grades to person.

Aspect: Creation and Storage of Statistics Book
  • Alternative 1 (current choice): A separate Statistics Book is created to store the statistics of all assessments. Also, these statistics are stored in a separate txt file (statistics.txt) from AddressBook

    • Pros: These assessment statistics have no direct link to the person object. It is a separate set of information accessible to all users (students, teachers and admin). Hence, a separate Statistics Book provides increased clarity and makes sense in terms of the end-usage. This also gives easy access to find and see statistics in raw XML format.

    • Cons: Using an extra storage file implies that additional methods and file paths are needed. Makes code lengthier and repetitive.

  • Alternative 2: Store statistics in AddressBook itself.

    • Pros: Everything is condensed and can be found in the same spot. Also, only one storage file would be needed.

    • Cons: It is messy and confusing in terms of implementation - Unrelated data is being stored together.

Aspect: Automatic calculation of statistics
  • Alternative 1 (current choice): A fixed set of statistics (average score, the total number of exam takers, max score and min score) are automatically calculated inside the application itself.

    • Pros: Reduces human effort. Makes the process of creating a statistic easier for the user as they would not have to use any external tools like Excel to do this.

    • Cons: Only the statistics parameters currently built into the app can be added. If the user wants to add any other parameter like pass rate, then it is currently not possible.

  • Alternative 2: The user manually calculates statistics using given data by hand and enters it in the app to store.

    • Pros: The user can choose to leave some field blank if wanted.

    • Cons: Extremely tedious. Against the whole point of digitizing the school management as manual paperwork is still involved.

Aspect: XML Storage of Assessments and Grades

  • Alternative 1 (current choice): Two concurrent lists are used to store the person index (as per latest person list) and respective grades for each assessment.

    • Pros: Since each student only has one grade per assessment, it is practical to store them as lists. Essentially, the keys of the hash map (in index form) and the values are stored as two separate lists. The corresponding pairs can be obtained by reading the entries at the same index in both lists.

    • Cons: This is an adaptation of the HashMap used to store grades in the code.

  • Alternative 2: Store the grades as a list of pairs (person index and grade value) for each assessment

    • Pros: Storage is more coherent.

    • Cons: Code is lengthier and more strenuous to write.