tp

Developer Guide

Acknowledgements

Data source

Third Party Library Used

‘org.glassfish:javax.json:1.1.4’

‘javax.json:javax.json-api:1.1.4’

Design

Architecture

Diagram

The Architecture Diagram given above explains the high-level design of the App.

Given below is a quick overview of main components and how they interact with each other.

Main components of the architecture

ExchangeCourseMapper class (referred to as Main in diagram) is responsible for the app launch and shut down.

The bulk of the app’s work is done by the following four components:

UI: The UI of the App.

Parser: The command executor and logic checker.

Command: Details and implementation of various commands/features of the app.

Storage: Reads data from, and writes data to, mylist.json.

How the architecture components interact with each other

Only some of the commands will need all 4 main components for example the Delete course command:

The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1.

Diagram

The UI, Parser and Storage components (also shown in the diagram above),

The Command component,

For example, the Command component defines its API in the Command.java abstract class and extends its functionality using the PersonalTrackerCommand.java and CheckInformationCommand class. Other components such as ListSchoolsCommand and DeleteCoursesCommand
interact with a given component through its interface rather than the concrete class (reason: to prevent outside component’s being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.

Diagram

The sections below give more details of the components and any additional components.

Class Diagrams

Command Structure:

Class diagram for Commands

The abstract command classes for our two main features, CheckInformationCommand and PersonalTrackerCommand. must inherit from the abstract Command class, which has the method to read the Json file containing course information. Each child class has the abstract execute method, to be implemented by their concrete child classes, specific to the command functionality.

Addition of new command features

When adding new command classes, developers should make sure that the concrete class inherits from either the CheckInformationCommand or PersonalTrackerCommand classes, depending on the new command’s functionality. The new command class should also have an implementation of the execute method, and uses the UI class to print messages on the CLI interface.

Class diagram for CheckInformationCommand

CheckInformationCommands list out information from the JSON file containing course mapping information, or from the user’s Personal Tracker.

Possible CheckInformationCommands are:

  1. ListCommandsCommand
  2. HelpCommand
  3. ListSchoolsCommand
  4. ListUniCoursesCommand
  5. ObtainContactsCommand
  6. FilterCoursesCommand
  7. ListPersonalTrackerCommand
  8. CompareMappedCommand

The above list of Command classes are concrete classes, and must implement the abstract execute(userInput) method.

Class diagram for CheckInformationCommand

PersonalTrackerCommands are commands that can modify the user’s saved mapping plans from the Personal Tracker, as well as access the list of saved mappings.

Possible CheckInformationCommands are:

  1. AddCoursesCommand
  2. DeleteCoursesCommand
  3. FindCoursesCommand

The above list of Command classes are concrete classes, and must implement the abstract execute(userInput, storage) method.

Parser class diagram:

The Parser class is responsible for handling and interpreting user input in the application. It reads user commands, processes them by splitting the input into command keywords and parameters, and then directs the flow of control to the appropriate command classes to execute the specified actions.

As ExchangeCourseMapper is mainly split into two main parts; Check Information and Personal Tracker. We decided to split the Parser class diagram into the two parts respectively to increase readability and neatness.

This class diagram represents the parsing of commands in Check Information. The multiplicities dependencies of the command are 0 or 1 because the dependency is only formed when the command is called, else, it will be zero.

Class diagram for CheckInformationParser

This class diagram represents the parsing of commands in Personal Tracker. The Parser class has associations with the UI class and Storage class and dependencies with the commands in Personal Tracker.

Class diagram for PersonalTrackerParser

CourseValidator Class Diagram:

Class diagram for CourseValidator

Storage Class Diagram:

Class diagram for Storage

Storage System Overview

The storage system is structured to manage the persistence and integrity of course data for the application. It consists of the following key components:

  1. Storage Class: The main interface for adding, deleting, retrieving, and loading courses. It interacts with CourseRepository for data persistence, ensuring all course-related actions are directed to the appropriate storage location.

  2. CourseRepository: Acts as an intermediary layer, managing data access and defining the file path (MYLIST_FILE_PATH) for myList.json. It provides similar methods as Storage to add, delete, and retrieve course data, facilitating structured data storage.

  3. FileHandler: Responsible for file operations such as initializing, reading, writing, and appending to files. This class abstracts file manipulation, ensuring the storage system can perform reliable file operations without directly managing file-specific details.

  4. DataIntegrityChecker: Ensures the integrity of the stored data by validating file structure and content. It provides methods for validating the entire file or individual lines, helping maintain consistent data formatting and correctness.

  5. CourseValidator: Validates course inputs to check if they meet predefined criteria before being stored. This ensures that only valid data is added to the repository, reducing the likelihood of errors in the data storage.

  6. UI: Responsible for providing feedback to the user regarding any invalid entries or formats, enhancing user experience by notifying them of issues in a clear and informative way.

Each component is designed to separate concerns, with Storage focusing on high-level operations, CourseRepository on data organization, FileHandler on file I/O, and DataIntegrityChecker on data validation. This modular design allows for maintainability, testability, and scalability in managing persistent course data.

Implementation

General JSON file reading process

Class diagram

For commands that read through our data source file which contains university data, the process will be done in the Command class via a createJsonObject() method, where an IOException message will be displayed if reading fails.

1. List Commands Command

Overview:

The ListCommandsCommand provides users with a comprehensive list of all available commands in the CLI. This is particularly useful for new users or those unfamiliar with specific command formats.

How the feature is implemented:

Why it is implemented that way:

Alternatives considered:

Sequence Diagram:

List Commands Command Sequence Diagram

2. Help Command

Overview

This command provides users with detailed explanations of each feature and the ways to use them. This allows users to navigate this program easily and effectively.

How the feature is implemented:

Why it is implemented that way:

Alternative Implementation considered:

Sequence Diagram:

Help Command sequence diagram

3. List Schools Command

Overview:

This command is responsible for displaying and retrieving the full list of universities from our data source file which contains university data. It helps the users to identify the possible choices in Oceania.

How the feature is implemented:

Why it is implemented that way:

Alternative Implementation considered:

Sequence Diagram:

List School Command Sequence Diagram

4. List University Courses Command

Overview

This command is responsible for listing out all the mappable partner university’s (PU) courses and NUS courses. This allows users to plan their course mapping as it lists out all the possible courses they can map in a specified partner university.

How the feature is implemented:

Why it is implemented this why:

Sequence Diagram:

ListUniCourseCommand sequence diagram

5. Obtain Partner University Email and Contact Number Command

Overview:

The command is responsible to retrieve the email contact and contact number data for a specified partner university. It helps users to reach out to the partner universities for any enquiries about programs or exchange opportunities.

How the feature is implemented:

Why it is implemented that way:

Alternatives considered:

Sequence Diagram:

Filter Courses Sequence Diagram

6. Filter Courses Command

Overview:

This command is responsible for displaying and retrieving the full list of mappable courses from the partner universities to a user specified NUS course from our data source file which contains university data. It helps the users to identify whether that NUS course is suitable to be mapped overseas in Oceania.

How the feature is implemented:

Why it is implemented that way:

Sequence Diagram:

Filter Courses Sequence Diagram

7. Add Courses Command

Overview:

This command is responsible for adding users’ desired course mapping into the myList.json file. Additionally, each course mapping is checked against the current course mappings found in our database, to ensure that the course mapping is accurate and is limited to universities in Oceania. This command hence helps the users to keep track of their course mapping process.

How the feature is implemented:

Why is it implemented this way

Alternatives Considered

Sequence Diagram:

Add Courses Sequence Diagram

Sequence Diagram of AddCourseCommand

Course Validator Sequence Diagram

Sequence Diagram of Course Validator (extracted out of AddCourseCommand sequence diagram)

8. Delete Courses Command

Overview:

This command is responsible for deleting users’ existing course mapping plan from the myList.json file. This helps the users to keep track of their most recent course mapping plans, and to keep the myList.json file organised.

How the feature is implemented:

Why It Is Implemented This Way:

Sequence Diagram:

Delete Courses Sequence Diagram

9. ListPersonalTrackerCommand

Overview:

The ListPersonalTrackerCommand is responsible for listing all the mapped modules stored in the user’s personal tracker. This command retrieves all stored courses from myList.json via the Storage class and displays them in an indexed list format on the CLI.

How the Feature is Implemented:

Why It Is Implemented This Way:

Alternative Implementations Considered:

Sequence Diagram:

List Personal Tracker Command Sequence Diagram

10. Compare Mapped Command

Overview

The CompareMappedCommand is responsible for comparing course mappings between two specified partner universities. This command aids users in identifying common course mappings across the selected universities, as well as highlighting unique course mappings specific to each university.

How the Feature is Implemented

The CompareMappedCommand class extends CheckInformationCommand and overrides the execute method to define its custom behavior. Below is an outline of the execution flow:

Why it is Implemented this Way

Alternatives Considered

Sequence Diagram:

Compare Mapped Command Sequence Diagram

11. Find course mapping command

Overview

This command is responsible for the searching of a particular NUS course in the personalised tracker. This allows users to check and plan course mappings for that specified course.

How the feature is implemented:

Why it is implemented this way:

FindCourseCommand Sequence diagram

Product scope

Target user profile

Value proposition

User Stories

Version As a … I want to … So that I can …
v1.0 CEG student see the possible Oceania Universities for CEG students see all my possible choices in that region
v1.0 CEG student search for NUS courses to map search for related courses in PUs
v1.0 CEG student key in the school I want to go for exchange view the available course offered by the school
v1.0 CEG student want to see a list of commands know what to do to go to access the features
v2.0 CEG student obtain the email address of the partner universities send an email should I have any non-urgent queries
v2.0 CEG student obtain the contact number of the partner universities call the number should I have any urgent queries
v2.0 CEG student add a course mapping plan for a PU keep track of my courses for a specific PU
v2.0 CEG student list out the mapped courses by calling the list command I can track all the courses I have mapped to the different PUs
v2.0 CEG student delete a course mapping plan for a PU keep my list of saved plans organised
v2.0 CEG student ask for help when I am in doubt know what are the possible actions
v2.0 CEG student compare different mapping plans for each PU find the university best fit for my academic schedule
v2.0 CEG student search for course mappings in my personalised tracker check if I have mappings for that course

Non-Functional Requirements

  1. Access to a computer with Java 17 installed and an IDE that supports Java programming.
  2. A CEG student with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
  3. A CEG student should be able to maintain long term usage without a noticeable sluggishness in performance for typical usage.
  4. CEG student who is interested in planning SEP course mapping to universities in Oceania.

Glossary

Instructions for manual testing

[NOTE!] These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.

[NOTE!] SCHOOL_NAME inputs for the commands: list courses, obtain, add, compare are not case-sensitive, and you can either input the University’s full name, or its abbreviation.

1. Start ExchangeCourseMapper

  1. Follow the instructions in our User Guide Quick Start
  2. Expected: Welcome message on the terminal, prompting for the user’s input

2. Test Cases

2.1 Start State

2.2 Obtain names of Partner Universities in Oceania

2.3 Find mappable courses in a specific PU in Oceania

2.4 Obtain admin information of PUs in Oceania

2.5 Filter and obtain mappable courses for a specific NUS SoC course code

2.6 Add course mapping plans into Personal Tracker

2.7 Delete course mapping plans into Personal Tracker

[NOTE!] The tests below would require the tester to corrupt the myList.json file stored in the data folder (found in the directory where the tester’s terminal is running from).

To corrupt data: At least one saved course mapping plan saved in myList.json, then remove any of the information (NUS course code, Partner University’s name or the course that it offers which is mappable to the NUS course code).

To fix the file: Revert all changes, and make sure that there is no new line after the last course mapping plan.

2.8 Listing out all saved course mapping plans in Personal Tracker

Non-corrupted data file
Corrupted data file

2.9 Compare saved course mapping plans between universities

Non-corrupted data file
Corrupted data file

2.10 Find course mappings in Personal Tracker