{"id":27637819,"url":"https://github.com/yhouyang02/cplannerlite","last_synced_at":"2026-04-27T17:33:08.555Z","repository":{"id":116631527,"uuid":"398030845","full_name":"yhouyang02/CPlannerLite","owner":"yhouyang02","description":"A lightweight course planner application based on Java 8. ","archived":false,"fork":false,"pushed_at":"2022-05-14T06:19:27.000Z","size":1458,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T08:11:12.535Z","etag":null,"topics":["intellij-idea","java","java8","json-data","junit5","swing-gui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhouyang02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-19T17:56:46.000Z","updated_at":"2022-05-09T14:04:36.000Z","dependencies_parsed_at":"2023-07-21T12:34:31.346Z","dependency_job_id":null,"html_url":"https://github.com/yhouyang02/CPlannerLite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yhouyang02/CPlannerLite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhouyang02%2FCPlannerLite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhouyang02%2FCPlannerLite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhouyang02%2FCPlannerLite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhouyang02%2FCPlannerLite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhouyang02","download_url":"https://codeload.github.com/yhouyang02/CPlannerLite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhouyang02%2FCPlannerLite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intellij-idea","java","java8","json-data","junit5","swing-gui"],"created_at":"2025-04-23T21:32:36.029Z","updated_at":"2026-04-27T17:33:08.538Z","avatar_url":"https://github.com/yhouyang02.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPlanner Lite\n\n## Project Proposal\n\nThis is a course planning application that allows users to maintain several worklists on their local directories, in\nwhich users may customize and manage their own university courses. The application also allows users to check and\nmodifies the properties of the courses in their worklists, as well as providing useful statistics and tips for course\nregistration.\n\nThis application is designed to facilitate undergraduate students during their course registration process. As an\nundergrad myself, I always spent too many hours in planning my course schedules. I hope this application could help\nstudents to simplify their course planning processes at the start of every term.\n\n*Note: The properties of a course (e.g., course code, course name, credits, etc.) and some test cases are referenced\nfrom\n[Vancouver Academic Calendar 2021/22](http://www.calendar.ubc.ca/vancouver/), published by The University of British\nColumbia (UBC) Student Services.*\n\n## User Stories\n\n- As a user, I want to be able to add a course to my worklist.\n- As a user, I want to be able to delete a course from my worklist.\n- As a user, I want to be able to set whether a course is required for my specialization.\n- As a user, I want to be able to \"star\" or \"unstar\" a course to show my personal preference.\n- As a user, I want to be able to view the list of courses in my worklist.\n- As a user, I want to be able to view the list of only the starred courses in my worklist.\n- As a user, I want to be able to see the number of total credits in my worklist.\n- As a user, I want to be able to see the number of courses of each subject in my worklist.\n- As a user, I want to be able to receive a reminder when I have added too many courses in my worklist.\n- As a user, I want to be able to see the number of required and optional (non-required) courses in my worklist.\n- As a user, I want to be able to save my worklist to file.\n- As a user, I want to be able to load my worklist from file.\n- As a user, I want to be able to have the option to save my worklist to file or not when quitting the application.\n- As a user, I want to be able to have the option to load my worklist from file or not when starting the application.\n\n## Robust Design\n\n### Throwing Exceptions\n\nExceptions are thrown from `src/main/model` when illegal actions are performed against the worklist (e.g. trying to add\na course conflicting with existing ones, trying to delete a non-existing course from the worklist, trying to add a\ncourse with an impossible schedule, etc.) The below list contains all public methods that throw an exception declared\nin `src/main/exception`.\n\n- `src/main/model/Time.java`\n    - `Time(int hour, int minute)`\n        - throws `IllegalHourException` if `hour` is not between 0 and 24\n        - throws `IllegalMinuteException` if `minute` is not between 0 and 60\n    - `parseHour(String s)` and\n    - `parseMinute(String s)`\n        - throws `IllegalTimeException` if `s` is not a valid representation of time\n- `src/main/model/Schedule.java`\n    - `Schedule(boolean[] days, Time start, Time end)` and\n    - `parseDays(String s)`\n        - throws `IllegalDaysException` if `days` or `s` is not a valid representation of meeting days\n- `src/main/model/Course.java`\n    - `parseSubjectCode(String s)`,\n    - `parseCourseCode(String s)`, and\n    - `parseSectionCode(String s)`\n        - throws `IllegalCodesException` if `s` is not a valid representation of course-related codes\n- `src/main/model/Worklist.java`\n    - `addCourse(Course course)`\n        - throws `CourseAlreadyExistsException` if `course` is already existed in the worklist\n        - throws `CourseConflictsException` if the schedule of `course` conflicts with existing courses\n    - `deleteCourse(Course course)`,\n    - `setRequired(Course course, boolean required)`,\n    - `starCourse(Course course)`, and\n    - `unstarCourse(Course course)`\n        - throws `CourseNotFoundException` if `course` is not found in the worklist\n\n### Testing Exceptions\n\nExceptions are tested in `src/test/model`. Each test class contains tests for the corresponding class\nin `src/main/model`.\n\n### Handling Exceptions\n\n1. Exceptions for the console version are caught and handled in `src/main/ui/PlannerApp.java`.\n2. Exceptions for the GUI version are caught and handled in `src/main/ui/gui/PlannerManager.java`.\n\n## Refactoring\n\nThe purposes of the following classes are:\n\n- `MenuBar`: represents the menu bar displayed on the main window of the planner application\n- `PlannerListener`: detects the actions of user (in the current version, all possible actions are performed through the\n  menu bar)\n- `PlannerManager`: manages the worklist of the planner application (i.e., to create/load/save a worklist, and to\n  add/delete/star/unstar a course)\n- `CourseAdder`: lets user add a course, which is a specific action called from `PlannerManager`\n- `PlannerAppGUI`: displays the GUI components of the planner application\n\nAccording to the [UML Diagram](./UML_Design_Diagram.pdf) of this project, `MenuBar` is watched by `PlannerListener`,\nwhose behaviours are then performed by `PlannerManager`. Since `PlannerAppGUI` already has a field of `MenuBar`, there\nis no need for it to include the fields `PlannerListener` and `PlannerManager`. Instead, it could call the listener and\nmanager fields in `MenuBar` whenever needed. This reduces coupling between classes since `PlannerAppGUI` no longer needs\nto maintain those two fields. The resultant associations between classes will be a linear relationship, i.e.:\n\n```\nPlannerAppGUI -\u003e MenuBar -\u003e PlannerListener -\u003e PlannerManager -\u003e CourseAdder\n```\n\nBesides, the console version `PlannerApp` contains all fields for a temporary course to be added to the worklist, making\nthe class itself less cohesive and the code less readable. It should instead call another class (like the `CourseAdder`\nin the GUI version) to perform the action of adding a course. This increases the cohesion of each class and reduces\ncoupling between classes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhouyang02%2Fcplannerlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhouyang02%2Fcplannerlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhouyang02%2Fcplannerlite/lists"}