Car-sharing is becoming a more and more popular green alternative to owning a car. This is a simple program that manages a car-sharing service allowing companies to rent out their cars and find customers.
During the project implementation, I learnt the basics of SQL and work with the H2 database. Also learnt about advanced Java features such as Collections and Streams.
Examples The greater-than symbol followed by a space > represents the user input. Note that it's not part of the input.
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 2
The customer list is empty!
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 3
Enter the customer name:
> First customer
The customer was added!
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 3
Enter the customer name:
> Second customer
The customer was added!
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 2
Customer list:
1. First customer
2. Second customer
0. Back
> 1
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 3
You didn't rent a car!
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 2
You didn't rent a car!
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 0
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 0
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 2
The customer list:
1. First customer
2. Second customer
0. Back
> 1
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 1
Choose a company:
1. Car To Go
2. Drive Now
0. Back
> 1
Choose a car:
1. Hyundai Venue
2. Maruti Suzuki Dzire
0. Back
> 1
You rented 'Hyundai Venue'
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 3
Your rented car:
Hyundai Venue
Company:
Car To Go
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 1
You've already rented a car!
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 2
You've returned a rented car!
1. Rent a car
2. Return a rented car
3. My rented car
0. Back
> 0
1. Log in as a manager
2. Log in as a customer
3. Create a customer
0. Exit
> 0