{"id":24594616,"url":"https://github.com/inesiscosta/carpark","last_synced_at":"2025-10-05T18:30:31.814Z","repository":{"id":239945436,"uuid":"801026037","full_name":"inesiscosta/CarPark","owner":"inesiscosta","description":"A Parking Lot Management System written in C for my Introduction to Algorithms and Data Structures class.","archived":true,"fork":false,"pushed_at":"2024-10-30T17:28:42.000Z","size":11407,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T11:15:39.888Z","etag":null,"topics":["algorithms-and-data-structures","c"],"latest_commit_sha":null,"homepage":"","language":"C","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/inesiscosta.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}},"created_at":"2024-05-15T13:02:33.000Z","updated_at":"2024-11-04T19:32:32.000Z","dependencies_parsed_at":"2024-05-16T03:26:42.340Z","dependency_job_id":"48d29bc1-643d-4fbf-b250-52a9225e2690","html_url":"https://github.com/inesiscosta/CarPark","commit_stats":null,"previous_names":["inesiscosta/parkinglotmanagement","inesiscosta/carpark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inesiscosta%2FCarPark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inesiscosta%2FCarPark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inesiscosta%2FCarPark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inesiscosta%2FCarPark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inesiscosta","download_url":"https://codeload.github.com/inesiscosta/CarPark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235426459,"owners_count":18988420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithms-and-data-structures","c"],"created_at":"2025-01-24T11:15:43.985Z","updated_at":"2025-10-05T18:30:29.609Z","avatar_url":"https://github.com/inesiscosta.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parking Lot Management System\n\nThis was a project for my Introduction to Algorithms and Data Structures class. It is a program written in C to manage car parks allowing a user to register different parks and log vehicle entrys and exits as well as the fare they need to pay for the time they stayed in the park. enunciado.md contains the instructions provided by the teacher.\n\n## Installation\nTo set up the build environment run the following commands in your repository's root directory.\n\n1. **Install build dependencies:**\n    ```sh\n    sudo apt-get update \u0026\u0026 sudo apt-get install -y build-essential\n    ```\n\n2. **Build the project with GCC:**\n    ```sh\n    gcc -O3 -Wall -Wextra -Werror -Wno-unused-result -o parkingsystem *.c\n    ```\n\n### Usage\nTo use the Parking Lot Management System, run the compiled program:\n```bash\n./parkingsystem\n```\nBelow are the commands you can use with the Parking Management System:\n\n1. **Terminate the Program / Quit (`q`):**\n   - **Input:** `q`\n   - **Output:** None\n\n2. **Create or List Parking Lots (`p`):**\n   - **Input:** `p \u003cpark-name\u003e \u003ccapacity\u003e \u003cfare-for-each-15-minute-block\u003e \u003cfare-for-each-15-minute-block-after-1-hour\u003e \u003cmax-daily-fare\u003e`\n   - **Output without arguments:** `\u003cpark-name\u003e \u003ccapacity\u003e \u003cavailable-spaces\u003e`\n   - **Output with arguments:** None\n   - **Errors:**\n     - `parking already exists.` if the parking lot name already exists.\n     - `invalid capacity.` if the capacity is ≤ 0.\n     - `invalid cost.` if any cost is ≤ 0 or costs are not increasing.\n     - `too many parks.` if the maximum number of parks is reached.\n\n3. **Register Vehicle Entry (`e`):**\n   - **Input:** `e \u003cpark-name\u003e \u003clicense-plate\u003e \u003cdate\u003e \u003ctime\u003e`\n   - **Output:** `\u003cpark-name\u003e \u003cavailable-spaces\u003e`\n   - **Errors:**\n     - `no such parking.` if the parking lot does not exist.\n     - `parking is full.` if the parking lot is full.\n     - `invalid license plate.` if the license plate is invalid.\n     - `invalid vehicle entry.` if the vehicle is already inside a parking lot.\n     - `invalid date.` if the date/time is invalid or earlier than the last recorded entry/exit.\n\n4. **Register Vehicle Exit (`s`):**\n   - **Input:** `s \u003cpark-name\u003e \u003clicense-plate\u003e \u003cdate\u003e \u003ctime\u003e`\n   - **Output:** `\u003clicense-plate\u003e \u003centry-date\u003e \u003centry-time\u003e \u003cexit-date\u003e \u003cexit-time\u003e \u003cfare-paid\u003e`\n   - **Errors:**\n     - `no such parking.` if the parking lot does not exist.\n     - `invalid licence plate.` if the license plate is invalid.\n     - `invalid vehicle exit.` if the vehicle is not in the specified parking lot.\n     - `invalid date.` if the date/time is invalid or earlier than the last recorded entry/exit.\n\n5. **List Vehicle Entries and Exits (`v`):**\n   - **Input:** `v \u003clicense-plate\u003e`\n   - **Output:** `\u003cpark-name\u003e \u003centry-date\u003e \u003centry-time\u003e \u003cexit-date\u003e \u003cexit-time\u003e`\n   - **Errors:**\n     - `invalid licence plate.` if the license plate is invalid.\n     - `no entries found in any parking.` if there are no recorded entries for the license plate.\n\n6. **Show Parking Lot Billing (`f`):**\n   - **Input:** `f \u003cpark-name\u003e [\u003cdate\u003e]`\n   - **Output with one argument:** `\u003cdata\u003e \u003cinvoiced-amount\u003e`\n   - **Output with two arguments:** `\u003clicense-plate\u003e \u003cexit-time\u003e \u003cfare-paid\u003e`\n   - **Errors:**\n     - `no such parking.` if the parking lot does not exist.\n     - `invalid date.` if the date is invalid or after the last recorded entry/exit.\n\n7. **Remove Parking Lot (`r`):**\n   - **Input:** `r \u003cpark-name\u003e`\n   - **Output:** `\u003cpark-name\u003e`\n   - **Errors:**\n     - `no such parking.` if the parking lot does not exist.\n\n\n## Credits:\nThe tests and respective makefiles were provided by the teacher.\n\nAll rights reserved to Pedro Reis @ IST\nCopyright (C) 2021, Pedro Reis dos Santos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finesiscosta%2Fcarpark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finesiscosta%2Fcarpark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finesiscosta%2Fcarpark/lists"}