Open Lucky-Yuan00 opened 1 week ago
Please refer to the transaction constraints listed in the UG when you add a transaction in Adding a Transaction: add-tx We clearly defined the 1-1 relationship of user and car, such that a user can only rent one car at a time
As mentioned in the course website, this should not be considered a bug as we have informed the user in our UG as well as in the exception message.
Adding a Transaction: add-tx
Adds a new rental transaction to the system.
To add transaction bearing either an existing license plate number and/or customer name, all previous transactions containing either both or one of the parameter must be either marked as completed or be removed from the transaction list.
It means that when a customer and a car are in a transaction, either that customer or that car cannot involve in other transactions, including transactions with different time periods (start date - end date), unless that transaction is marked as completed or be removed from the transaction list.
Format: add-tx /c [LICENSE_PLATE_NUMBER] /u [CUSTOMER_NAME] /d [DURATION] /s [START_DATE: dd-MM-yyyy]
Team chose [response.Rejected
]
Reason for disagreement: [replace this with your explanation]
Description There is no reminder or indication in the docs that a user can only rent one car, perhaps adding it to the docs would improve the content better? For example add corresponding examples. Otherwise it could lead to misunderstandings, such as a reader wanting to rent more than one car.
Steps to Reproduce add-tx /c SGE9999X /u John Chris Wu /d 365 /s 01-05-2028 Transaction added: [ ] TX3 | SGE9999X | John Chris Wu | 365 days Start Date: 01-05-2028 | End Date: 01-05-2029
What would you like to do?
list-txs Here are all the transactions: 1) [ ] TX2 | SZZ1579D | John | 365 days Start Date: 01-05-2029 | End Date: 01-05-2030 2) [ ] TX3 | SGE9999X | John Chris Wu | 365 days Start Date: 01-05-2028 | End Date: 01-05-2029
What would you like to do?
add-tx /c SGE9999X /u John Chris Wu /d 365 /s 01-05-2028 Customer has rented a car. What would you like to do?
add-tx /c SGE8234X /u John Chris Wu /d 365 /s 01-05-2028 Customer has rented a car.
Expected Behavior There are corresponding reminders or instructions in the documentation.
Evidence