https://github.com/spookyless/pz1-hotel
Project for "Programowanie Zaawansowane 1" course at AGH University of Krakow
https://github.com/spookyless/pz1-hotel
Last synced: 8 months ago
JSON representation
Project for "Programowanie Zaawansowane 1" course at AGH University of Krakow
- Host: GitHub
- URL: https://github.com/spookyless/pz1-hotel
- Owner: Spookyless
- Created: 2023-11-06T18:48:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T13:39:30.000Z (over 2 years ago)
- Last Synced: 2025-06-21T17:05:06.992Z (12 months ago)
- Language: Java
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pz1-hotel
[](https://drone.spookyless.net/Spookyless/pz1-hotel)
[](https://sonar.spookyless.net/dashboard?id=Spookyless_pz1-hotel_AYumlzOy6v4EdcFC8vRC)
[](https://sonar.spookyless.net/dashboard?id=Spookyless_pz1-hotel_AYumlzOy6v4EdcFC8vRC)
Project created for [Programowanie Zaawansowane 1](https://sylabusy.agh.edu.pl/en/1/2/18/1/4/16/140) course at AGH University of Krakow.
## Project description
### Hotel management
Create a simple CLI program that manages a hotel. Rooms are numbered using whole numbers, where the first digit signifies the floor of the room (i.e. room number 101 is located on the first floor).
Program should allow to use the following commands (case-insensitive):
- `list` - lists all the rooms
- `view` - prompts for room number, then displays information about the room and the guest, if any is staying there. If the room doesn't exist shows an error
- `checkin` - prompts for room number, then asks for guest's details and assigns him to the room. If the room is occupied or not valid, shows an error
- `checkout` - reverse of `checkin`, prompts for room number and removes the quest. If the room is not occupied or not valid, shows an error
- (bonus) `save` - saves current state to CSV/XLSX file
- `exit` - self-explanatory
### Implementation of Map
You are also required to write your own implementation of a generic class `MyMap`, which implements the `Map` interface with (at least) these methods:
```Java
public interface Map {
boolean put(K key, V value);
boolean remove(K key);
V get(K key);
List keys();
}
```
You can use the following classes to implement it: `java.util.List`, `java.util.LinkedList`, `java.util.ArrayList`.
Your implementation should be based on two lists: keys and values.
### Bonus
The initial configuration of the hotel should be read from a CSV/XLSX file with the following structure:
| room number | description | price | (optional) guest |
|-------------|-------------|-------|------------------|