https://github.com/kaydvc/activity-calendar
https://github.com/kaydvc/activity-calendar
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kaydvc/activity-calendar
- Owner: KayDVC
- License: mit
- Created: 2023-08-16T04:36:04.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-16T05:05:08.000Z (over 2 years ago)
- Last Synced: 2025-02-01T18:12:54.533Z (about 1 year ago)
- Language: Java
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Table of Contents
1. [Objective](#objective)
2. [Use](#use)
* [Input Files](#input-files)
* [Example Run](#example-run)
## Objective
The objective of this project was to develop a practical application that uses a [skip list](https://en.wikipedia.org/wiki/Skip_list) as the main data structure. This was completed in 2021 as an assignment.
The application features database-like storage and commands to add, retrieve, and view data.
- _Note_ : The [FakeRandHeight.java](src/util/FakeRandHeight.java) class was created by my professor, Dr. Philip Chan, and is properly credited within the file.
## Use
Requires Java. Tested using `openjdk 17.0.8`.
### Input Files
The app requires the use of an input text file.
The following commands are valid.
```
AddActivity time activity
RemoveActivity time
GetActivity time
GetActivitiesBetweenTimes startTime endTime
GetActivitiesForOneDay date
GetActivitiesFromEarlierInTheDay currentTime
PrintSkipList
```
*All times values should be in mmddhhmm format except for the "GetActivitiesForOneDay" command; use mmdd format instead.*
_See examples in `samples`_
### Example Run
```bash
cd src
javac ActivityCalendar.java
java ActivityCalendar ../samples/One.txt
Command received:
AddActivity 03200930 Cycling
✅ Command executed successfully
--------------------
Command received:
AddActivity 03211100 Jogging
✅ Command executed successfully
--------------------
Command received:
AddActivity 03231045 Hiking
✅ Command executed successfully
--------------------
Command received:
AddActivity 03231945 Workout
✅ Command executed successfully
--------------------
Command received:
GetActivity 03211100
Response:
Jogging
✅ Command executed successfully
--------------------
Command received:
GetActivitiesForOneDay 0323
Response:
03231045 : Hiking
03231945 : Workout
✅ Command executed successfully
--------------------
Command received:
GetActivitiesFromEarlierInTheDay 03231600
Response:
03231045 : Hiking
✅ Command executed successfully
--------------------
Command received:
PrintSkipList
Response:
(L2) 03231945 : Workout
(L1) 03211100 : Jogging, 03231945 : Workout
(L0) 03200930 : Cycling, 03211100 : Jogging, 03231045 : Hiking, 03231945 : Workout
✅ Command executed successfully
--------------------
```
Don't degrade yourself by using Eclipse🤢; [here's a tutorial](https://code.visualstudio.com/docs/java/java-tutorial) on how to setup VS Code for Java. Basic, but at least you'll be able to sleep at night with dignity and self-respect.
If used as "inspiration," please link back to this repo.
Thanks,
\- Kay