Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2113-T11-3] CliRental #29

Open
wants to merge 724 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 164 commits
Commits
Show all changes
724 commits
Select commit Hold shift + click to select a range
6e027ac
Fix issue #138
rexkoh425 Nov 10, 2024
4fdba7b
Fix issue #142
rexkoh425 Nov 10, 2024
0e4e3dc
Update Test finding transactions by customer
tkhahns Nov 10, 2024
ddba790
Fix issue #153
rexkoh425 Nov 10, 2024
03b295b
Fix test case
tkhahns Nov 10, 2024
5b9ebe9
Modify test case logic
tkhahns Nov 10, 2024
8018042
Add manual testing instructions
rexkoh425 Nov 10, 2024
2d36608
Update files
Nov 10, 2024
7c2f668
Update files
Nov 10, 2024
ae00d3c
solve tx id not generated when addtxwithoutPrintingInfo is called
Nov 10, 2024
418a749
Update TransactionListTest.java
tkhahns Nov 10, 2024
c57aa48
Update TransactionListTest.java
tkhahns Nov 10, 2024
9b1ab98
Add age restriction for customer
rexkoh425 Nov 10, 2024
4679083
Update Junit
rexkoh425 Nov 10, 2024
53a9ef1
added generation of transaction id to test cases
Nov 10, 2024
02a96c7
extracted if conditions for checks on car has been rented during and …
Nov 10, 2024
074f1c5
Update Junit
rexkoh425 Nov 10, 2024
04ae345
Add new exception to handle cases when car rental price exceeds the t…
CT9ARyan Nov 10, 2024
3e5338d
Define new constant to store maximum car rental price
CT9ARyan Nov 10, 2024
17b777e
Update 'isValidPrice' method and edit 'isValidPrice' code block in 'p…
CT9ARyan Nov 10, 2024
3732e8c
Update Quick Start
rexkoh425 Nov 10, 2024
5124b77
Update imports
rexkoh425 Nov 10, 2024
8eb78fd
Merge pull request #207 from SemiColonKen/master
SemiColonKen Nov 10, 2024
ee5a511
Merge branch 'master' into A-SaveFileDocumentation
rexkoh425 Nov 10, 2024
d648175
Fix checkstyle
rexkoh425 Nov 10, 2024
bc0bd24
Merge branch 'A-SaveFileDocumentation' of https://github.com/rexkoh42…
rexkoh425 Nov 10, 2024
210fbb4
Fix checkstyle
rexkoh425 Nov 10, 2024
0aa9b11
Update Ui test
rexkoh425 Nov 10, 2024
9590199
Update Ui test
rexkoh425 Nov 10, 2024
1ffba0b
Update Ui test
rexkoh425 Nov 10, 2024
b0d6f14
Change to Customer name
rexkoh425 Nov 10, 2024
d327fd8
Merge pull request #211 from rexkoh425/A-SaveFileDocumentation
rexkoh425 Nov 10, 2024
4e29bd9
fix authorship
AaronZZ10 Nov 10, 2024
159bd2b
fix authorship
AaronZZ10 Nov 10, 2024
f979cb0
Merge branch 'master' into master
tkhahns Nov 10, 2024
9b5751b
updated ppp
AaronZZ10 Nov 10, 2024
ff9a250
Merge pull request #212 from AaronZZ10/master
AaronZZ10 Nov 10, 2024
877a8a6
update clearTransactionList mehod
tkhahns Nov 10, 2024
948793a
Update to store transactionID
rexkoh425 Nov 10, 2024
b7f2184
Fix testLoadTransactionDataIfExist()
tkhahns Nov 10, 2024
875d771
Fix testUpdateTransactionDataFile()
tkhahns Nov 10, 2024
32c9207
Remove unused imports
rexkoh425 Nov 10, 2024
6c443a9
Fix testGetTransactionDataFilename()
tkhahns Nov 10, 2024
1a9c05f
Merge pull request #213 from rexkoh425/A-StoreTxID
tkhahns Nov 10, 2024
dcf89ba
Merge branch 'master' into master
tkhahns Nov 10, 2024
f1ec8d9
Fix Transactions code
tkhahns Nov 10, 2024
d88e1f1
Change implementation of Tx ID generation for easier saving and loadi…
Nov 10, 2024
3bb7f4d
Add Transactionfile to load Tx Counter
Nov 10, 2024
eda2cb3
Merge pull request #208 from tkhahns/master
tkhahns Nov 10, 2024
6af181e
Add error handling for data
rexkoh425 Nov 10, 2024
03b7f58
Fix checkstyle
rexkoh425 Nov 10, 2024
e5a5f06
Update UG
rexkoh425 Nov 10, 2024
d498adb
Fixed saved tx id
Nov 11, 2024
6efe9fc
Merge branch 'master' into master
SemiColonKen Nov 11, 2024
297e70b
Fixed junit test error
Nov 11, 2024
8b69738
Fixed junit test error (forgot to add transaction files)
Nov 11, 2024
c23a2b4
Fixed merge error (TransactionList)
Nov 11, 2024
1b20e5f
Fixed junit test error (TransactionTest)
Nov 11, 2024
88ceb86
Fixed junit test error (TransactionListTest)
Nov 11, 2024
b88bd4a
Fixed junit test error (TransactionTest)
Nov 11, 2024
b3ee247
Merge pull request #215 from SemiColonKen/master
tkhahns Nov 11, 2024
34b808d
Change phone number format
tkhahns Nov 11, 2024
35e1800
Merge branch 'master' of https://github.com/tkhahns/tp
tkhahns Nov 11, 2024
78844f5
A-RemoveAllCustomers
tkhahns Nov 11, 2024
1885723
Remove clearTransactionCounter method in test file
tkhahns Nov 11, 2024
4c06ff0
Add phone number constraints
tkhahns Nov 11, 2024
bd86431
Add test cases for valid phone numbers
tkhahns Nov 11, 2024
5000091
Fix parser test
tkhahns Nov 11, 2024
3d6fc26
Comment out the clear method before tests
tkhahns Nov 11, 2024
19e61c1
Remove clear methods
tkhahns Nov 11, 2024
9b253f0
Update EXPECTED output
tkhahns Nov 11, 2024
a74f49b
Modify runtest.sh
tkhahns Nov 11, 2024
a8e27a0
Fix runtest.bat and find-txs-by-customer
tkhahns Nov 11, 2024
d1beac8
Update documentation and sample code output for some features in user…
CT9ARyan Nov 11, 2024
3dc63c1
Fixed bug: find-tx-by-customer to display exact input from customer a…
Nov 11, 2024
ba883ae
Restore background color of all diagrams to white to standardise acro…
CT9ARyan Nov 11, 2024
ca279e2
Modify EXPECTED output
tkhahns Nov 11, 2024
e1fe8c6
Update 'CarList' methods to ignore letter case when querying for lice…
CT9ARyan Nov 11, 2024
f7d9cd5
Add new method to check if string can be parsed to double in 'CarParser'
CT9ARyan Nov 11, 2024
b7ec6a0
Fixed junit test error (TransactionListTest)
Nov 11, 2024
fc6f31c
Add new if block that throws NumberFormatException with a custom mess…
CT9ARyan Nov 11, 2024
9725857
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
SemiColonKen Nov 11, 2024
1a3a3ce
Merge pull request #216 from tkhahns/master
tkhahns Nov 11, 2024
47b3c9a
Edit 'remove-car' methods and related exception messages when an exce…
CT9ARyan Nov 11, 2024
b71a048
Edit commands description in help page to match those in user guide
CT9ARyan Nov 11, 2024
61434f9
Add try-catch block for the add-car command case to catch any NumberF…
CT9ARyan Nov 11, 2024
353c586
Update command format of add-tx
CT9ARyan Nov 11, 2024
3e0fa79
Update 'removeAllTxs' method to update all car rental status to 'Avai…
CT9ARyan Nov 11, 2024
2aed70a
Fixed bug; Duration not shown when add-tx with 1 day
Nov 11, 2024
51a8dce
Merge branch 'master' into branch-BugFixes
CT9ARyan Nov 11, 2024
76a4386
Merge pull request #217 from SemiColonKen/master
tkhahns Nov 11, 2024
3dd8fc5
Add summary of contents with section links in user guide
CT9ARyan Nov 11, 2024
8586875
Update JUnit tests and test conditions
CT9ARyan Nov 11, 2024
e2b2d2f
Update EXPECTED.txt
CT9ARyan Nov 11, 2024
2702855
Add input.txt back to text-ui-test folder due to accidental deletion
CT9ARyan Nov 11, 2024
5f1cef2
Edit input.txt contents
CT9ARyan Nov 11, 2024
67d007e
Update EXPECTED.txt
CT9ARyan Nov 11, 2024
bcdc8c2
Merge pull request #218 from CT9ARyan/branch-BugFixes
SemiColonKen Nov 11, 2024
de0eb95
Update unique Customer constraints
tkhahns Nov 11, 2024
d01be43
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
tkhahns Nov 11, 2024
dda4809
Update 'add-car' description to be clearer and more specific in user …
CT9ARyan Nov 11, 2024
1892031
Update portfolio link to PPP in AboutUs.md
CT9ARyan Nov 11, 2024
e45fb52
Add new .md file for PPP
CT9ARyan Nov 11, 2024
b6733fe
Add 'Overview' section documenting product summary in PPP
CT9ARyan Nov 11, 2024
059fac9
Add 'Code contribution' and 'Features implemented' sections in PPP
CT9ARyan Nov 11, 2024
f4a518a
Add 'User guide contributions' in PPP
CT9ARyan Nov 11, 2024
a06553f
Add 'Developer guide contributions' section in PPP
CT9ARyan Nov 11, 2024
57aeb6b
Fix checkstyle error
tkhahns Nov 11, 2024
09c5921
Merge branch 'master' of https://github.com/tkhahns/tp
tkhahns Nov 11, 2024
8e293e9
Fix checkstyle error
tkhahns Nov 11, 2024
63b2da1
Merge pull request #219 from tkhahns/master
tkhahns Nov 11, 2024
392a90e
Add product name at the top of PPP
CT9ARyan Nov 11, 2024
bfbf4f6
Add pull request links for PRs reviewed under 'Team-based tasks contr…
CT9ARyan Nov 11, 2024
e02ebb9
Improve format and aesthetics of PPP and edited description of some f…
CT9ARyan Nov 11, 2024
64f47d5
Reset TX ID counter to 1 when removing all TXs
Nov 11, 2024
b7f340e
Merge branch 'master' into A-RexCodeQuality
rexkoh425 Nov 11, 2024
3687dd0
Resolve merge conflict
rexkoh425 Nov 11, 2024
63c7932
Add test cases
tkhahns Nov 11, 2024
97b7f9b
Hide footnote
rexkoh425 Nov 11, 2024
cac0bc8
Edit Junit
rexkoh425 Nov 11, 2024
9d4ce54
Merge pull request #222 from tkhahns/master
tkhahns Nov 11, 2024
d756de1
Merge pull request #220 from SemiColonKen/master
tkhahns Nov 11, 2024
3bdaf07
Resolve merge conflict
rexkoh425 Nov 11, 2024
8d4427b
Resolve merge conflict
rexkoh425 Nov 11, 2024
a88d5d8
Convert newly updated UML diagrams to .png file to be used in develop…
CT9ARyan Nov 11, 2024
d96786e
Updated UG for missing commands. Added updated sample output.
Nov 11, 2024
7468fee
Update contact number info
rexkoh425 Nov 11, 2024
86242dc
Merge pull request #223 from SemiColonKen/master
tkhahns Nov 11, 2024
6948ccb
Updated UG
Nov 11, 2024
1ceb4ea
Fix spacing
rexkoh425 Nov 11, 2024
7d9afae
Merge branch 'master' into A-RexCodeQuality
rexkoh425 Nov 11, 2024
bab215e
Merge pull request #221 from rexkoh425/A-RexCodeQuality
rexkoh425 Nov 11, 2024
8a7397c
Merge pull request #224 from SemiColonKen/master
tkhahns Nov 11, 2024
d438e76
Create PPP
tkhahns Nov 11, 2024
4247b42
Update list of commands in help page
CT9ARyan Nov 11, 2024
9cea98b
Add new UML sequence diagram for 'remove-car' command
CT9ARyan Nov 11, 2024
947bdd3
Remove box grouping in remove car sequence diagram
CT9ARyan Nov 11, 2024
86c1c4b
Convert remove car sequence diagram into .png for developer guide
CT9ARyan Nov 11, 2024
60d574b
Update diagrams
rexkoh425 Nov 11, 2024
3939bdb
Update code output .png files due to change in code output format for DG
CT9ARyan Nov 11, 2024
ebb53b0
Add new section for 'removing a car' sequence diagram
CT9ARyan Nov 11, 2024
9999638
Remove unnecessary lines in DG
CT9ARyan Nov 11, 2024
6e28a84
add-tx customer name is case insensitive now. John and john means the…
Nov 11, 2024
2e64e4f
Merge branch 'master' into master
SemiColonKen Nov 11, 2024
901699d
Merge branch 'master' into branch-PPP
CT9ARyan Nov 11, 2024
458ac7f
Update DG
rexkoh425 Nov 11, 2024
0355493
Edit checkstyle
rexkoh425 Nov 11, 2024
0beb200
Update EXPECTED.txt to pass CLI test on github
CT9ARyan Nov 11, 2024
f476d5d
Merge pull request #226 from SemiColonKen/master
SemiColonKen Nov 11, 2024
1637829
Merge pull request #225 from CT9ARyan/branch-PPP
CT9ARyan Nov 11, 2024
1287f54
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
tkhahns Nov 11, 2024
35a75e1
Update PPP
rexkoh425 Nov 11, 2024
4ab7802
Update sequence diagram
rexkoh425 Nov 11, 2024
26fda81
Add profile pic
rexkoh425 Nov 11, 2024
92b2c58
remove-user is now case insensitive
Nov 11, 2024
0ba82d8
remove-user is now case insensitive
Nov 11, 2024
e0220da
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
SemiColonKen Nov 11, 2024
156a039
Slight modification of output for printUncompletedTransactions, remov…
tkhahns Nov 11, 2024
ec54afe
Fix userName not found test case
tkhahns Nov 11, 2024
318d713
Merge pull request #228 from tkhahns/master
tkhahns Nov 11, 2024
607e9c9
Improve Junit test case
rexkoh425 Nov 11, 2024
72f162b
Merge branch 'master' into master
SemiColonKen Nov 11, 2024
ef7f0c0
Merge pull request #229 from rexkoh425/A-Rex-V2-1
rexkoh425 Nov 11, 2024
eb7f50c
Merge pull request #227 from SemiColonKen/master
SemiColonKen Nov 11, 2024
c162620
Update formatting for PPP
CT9ARyan Nov 11, 2024
72b481b
Update logo and fix find-txs-by-customer output
tkhahns Nov 11, 2024
2dc97ed
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
tkhahns Nov 11, 2024
376184c
Fix checkstyle error
tkhahns Nov 11, 2024
4ac89e8
Update EXPECTED.txt
tkhahns Nov 11, 2024
1106888
Update logo
tkhahns Nov 11, 2024
ea87fdb
Complete DG with User Stories
tkhahns Nov 11, 2024
fb9bac9
Update AboutUs.md
tkhahns Nov 11, 2024
c98fc0f
Add PPP
tkhahns Nov 11, 2024
f5a8af0
Update PPP
tkhahns Nov 11, 2024
9fc3618
updated ug
Nov 12, 2024
a161451
updated customer list
Nov 12, 2024
39a9eb3
Merge branch 'master' of https://github.com/SemiColonKen/tp
Nov 12, 2024
e678a55
Added PPP
Nov 12, 2024
e6ef22f
Updated remove-customer
Nov 12, 2024
666425f
add junittest for remove-user
Nov 12, 2024
b203ed3
updated remove-user for empty list
Nov 12, 2024
60fcf5b
updated ppp
AaronZZ10 Nov 12, 2024
fef38ef
improve code quality
AaronZZ10 Nov 12, 2024
0df0ead
updated import for CustomerListTest to fix checkstyle error
Nov 12, 2024
fdd8101
updated line length for CustomerList to fix checkstyle error
Nov 12, 2024
c7665ad
improve code quality
AaronZZ10 Nov 12, 2024
017b842
improve code quality
AaronZZ10 Nov 12, 2024
9c3b69f
Merge pull request #232 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
d20ed88
Update PPP
tkhahns Nov 12, 2024
f0676fb
Merge pull request #230 from tkhahns/master
tkhahns Nov 12, 2024
72f5de6
Merge pull request #231 from SemiColonKen/master
tkhahns Nov 12, 2024
489245b
Update documentation
rexkoh425 Nov 12, 2024
f033bd2
Merge pull request #234 from rexkoh425/A-RexFinalPR
tkhahns Nov 12, 2024
73689d6
update iotest
AaronZZ10 Nov 12, 2024
40ddfa3
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
AaronZZ10 Nov 12, 2024
32c5924
update iotest
AaronZZ10 Nov 12, 2024
3d780ac
update iotest
AaronZZ10 Nov 12, 2024
f33900c
update iotest
AaronZZ10 Nov 12, 2024
52f68e1
Update Junit
rexkoh425 Nov 12, 2024
35e9d41
update iotest
AaronZZ10 Nov 12, 2024
e9d0647
Merge pull request #236 from rexkoh425/A-JunitFix
rexkoh425 Nov 12, 2024
79fcf5c
update iotest
AaronZZ10 Nov 12, 2024
0eac869
update iotest
AaronZZ10 Nov 12, 2024
8816c11
update iotest
AaronZZ10 Nov 12, 2024
0262b4c
Update Junit
rexkoh425 Nov 12, 2024
d5998b4
update iotest
AaronZZ10 Nov 12, 2024
5ef257f
update iotest
AaronZZ10 Nov 12, 2024
187bf07
Update Junit
rexkoh425 Nov 12, 2024
f612ee6
update iotest
AaronZZ10 Nov 12, 2024
8e7a981
Update DG for manual test
rexkoh425 Nov 12, 2024
e5066e4
update iotest
AaronZZ10 Nov 12, 2024
7aaf6db
update iotest
AaronZZ10 Nov 12, 2024
b17fbe5
Merge pull request #237 from rexkoh425/A-JunitFix
tkhahns Nov 12, 2024
5511330
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
AaronZZ10 Nov 12, 2024
74ee923
Update age limit handling
rexkoh425 Nov 12, 2024
5d7e101
Merge pull request #235 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
28f3dbe
Merge pull request #238 from rexkoh425/A-JunitFix
tkhahns Nov 12, 2024
21b74b2
fix merge conflict
AaronZZ10 Nov 12, 2024
4404b9d
Update PPP
rexkoh425 Nov 12, 2024
14880ba
Merge pull request #239 from rexkoh425/A-JunitFix
rexkoh425 Nov 12, 2024
3cb766a
Add <br>
rexkoh425 Nov 12, 2024
139cf58
Merge pull request #240 from rexkoh425/A-JunitFix
rexkoh425 Nov 12, 2024
c269619
Update formatting
rexkoh425 Nov 12, 2024
c8e6399
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
AaronZZ10 Nov 12, 2024
de8a954
images of ryan and aaron
AaronZZ10 Nov 12, 2024
1ced23d
Merge pull request #242 from rexkoh425/A-JunitFix
rexkoh425 Nov 12, 2024
666e7f9
Merge pull request #241 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
3857ff9
Updated ug and ppp
Nov 12, 2024
716993b
Slight modification of UG, DG, and upload team members' photos
tkhahns Nov 12, 2024
85a1b47
Merge pull request #243 from SemiColonKen/master
tkhahns Nov 12, 2024
4c60fbe
Merge branch 'master' into master
tkhahns Nov 12, 2024
a7baa3e
Merge pull request #244 from tkhahns/master
tkhahns Nov 12, 2024
06f4873
update ppp and dg
AaronZZ10 Nov 12, 2024
4c15de9
Merge pull request #245 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
bc3e534
update ppp and dg
AaronZZ10 Nov 12, 2024
bd3168b
update ppp
AaronZZ10 Nov 12, 2024
a3159e3
update ppp
AaronZZ10 Nov 12, 2024
d49acaa
update ppp
AaronZZ10 Nov 12, 2024
b59311c
update ppp
AaronZZ10 Nov 12, 2024
80b0ed9
Merge pull request #246 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
2c2b95d
Update DG
tkhahns Nov 12, 2024
893d164
Merge branch 'AY2425S1-CS2113-T11-3:master' into master
tkhahns Nov 12, 2024
19d499c
update ppp
AaronZZ10 Nov 12, 2024
fb61f1e
Merge pull request #247 from tkhahns/master
tkhahns Nov 12, 2024
c9994d5
Merge pull request #248 from AaronZZ10/master
AaronZZ10 Nov 12, 2024
48f2a95
Update AboutUs.md
tkhahns Nov 13, 2024
1e7e9fa
Merge branch 'master' of https://github.com/tkhahns/tp
tkhahns Nov 13, 2024
221ce44
Merge pull request #249 from tkhahns/master
tkhahns Nov 13, 2024
05efffc
Fix Kenneth's PPP link error
tkhahns Nov 14, 2024
fe4d539
Merge pull request #250 from tkhahns/master
tkhahns Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("seedu.clirental.CliRental")
}

shadowJar {
archiveBaseName.set("duke")
archiveBaseName.set("CliRental")
archiveClassifier.set("")
}

Expand Down
19 changes: 14 additions & 5 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# About us


Display | Name | Github Profile | Portfolio
--------|:-----:|:------------------------------------:|:---------:
![](/docs/team/Khanh.png) | Khanh | [Github](https://github.com/tkhahns) | [Portfolio](docs/team/johndoe.md)

Display | Name | Github Profile | Portfolio
--------|:--------:|:--------------------------------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Rex Koh | [Github](https://github.com/rexkoh425) | [Portfolio](docs/team/RexKoh.md)

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ryan Fong | [Github](https://github.com/CT9ARyan) | [Portfolio](./team/ryanfong.md)

Display | Name | Github Profile | Portfolio
--------|:-------:|:--------------------------------------:|:---------:
![](https://avatars.githubusercontent.com/u/94769848?v=4) | Liu Hao | [Github](https://github.com/AaronZZ10) | [Portfolio](./team/liuhao.md)
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duke
# CliRental

{Give product intro here}
Welcome to CliRental, a perfect desktop app dedicate to managing a car rental business involves handling large volumes of data, making traditional pen-and-paper methods inefficient for managers. This app is designed specifically for car rental managers, offering a Command Line Interface (CLI) that enables quick data entry and efficient tracking of customers, cars, and transactions.

Useful links:
* [User Guide](UserGuide.md)
Expand Down
64 changes: 45 additions & 19 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,68 @@
# User Guide
# CliRental User Guide

## Introduction

{Give a product intro}
Clirental is a CLI-based application which allows car rental companies
to track their customers , cars and rental transactions.

## Quick Start

{Give steps to get started quickly}

1. Ensure that you have Java 17 or above installed.
1. Down the latest version of `Duke` from [here](http://link.to/duke).
2. Download the latest version of `CliRental` from [here](https://github.com/AY2425S1-CS2113-T11-3/tp/releases).

## Features
## Features

{Give detailed description of each feature}
### Adding a user to the database: `add-user`

### Adding a todo: `todo`
Adds a new item to the list of todo items.
Adds a customer to the list of customers tracked by the car rental application

Format: `todo n/TODO_NAME d/DEADLINE`
Format: `add-user /u [USERNAME] /a [AGE] /c [CONTACT_NUMBER]`

* The `DEADLINE` can be in a natural language format.
* The `TODO_NAME` cannot contain punctuation.
* `USERNAME` : `STRING`.
* `AGE` : `INT`
* `CONTACT_NUMBER` : `INT`
* `/u` , `/a` , `/c` must be in sequence.

Example of usage:

`todo n/Write the rest of the User Guide d/next week`
`add-user /u John /a 18 /c 95382572`

Sample Response:

```
____________________________________________________________
add-user /u John /a 18 /c 95382572
Customer added
Username : John
Age : 18
Contact Number : 95382572
What would you like to do?
____________________________________________________________
```

### List all cars in the database: `list-cars`

`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`
Lists all the car which the company owns.

Format: `list-cars`

Sample Response:

```
____________________________________________________________
list-cars
Here are the current cars in the company
1) Toyota Corolla | SGM4932K | $120.0 | Not Rented
What would you like to do?
____________________________________________________________
```

## FAQ

**Q**: How do I transfer my data to another computer?
**Q**: Is there any file saving system in place currently?

**A**: {your answer here}
**A**: Unfortunately no , we are currently working on it. Thank you for your patience.

## Command Summary

{Give a 'cheat sheet' of commands here}

* Add todo `todo n/TODO_NAME d/DEADLINE`
* Add todo `add-user /u [USERNAME] /a [AGE] /c [CONTACT_NUMBER]`
Binary file added docs/team/Khanh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/team/liuhao.md
Empty file.
2 changes: 1 addition & 1 deletion docs/team/johndoe.md → docs/team/ryanfong.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# John Doe - Project Portfolio Page
# Ryan Fong - Project Portfolio Page

## Overview

Expand Down
61 changes: 61 additions & 0 deletions src/main/java/car/Car.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package car;

import exceptions.CarException;

public class Car {

private String model;
private String licensePlateNumber;
private double price;
private boolean isRented;

public Car(String model, String licensePlateNumber, double price) throws CarException{
this.model = model;
this.licensePlateNumber = licensePlateNumber;
if (price < 0.00) {
throw CarException.invalidPrice();
} else {
this.price = Double.parseDouble(String.format("%.2f", price));
}
this.isRented = false;
}

public void setModel(String model) {
this.model = model;
}

public String getModel() {
return model;
}

public void setLicensePlateNumber(String licensePlateNumber) {
this.licensePlateNumber = licensePlateNumber;
}

public String getLicensePlateNumber() {
return licensePlateNumber;
}

public void setPrice(double price) {
this.price = price;
}

public double getPrice() {
return price;
}

public void setRented(boolean isRented) {
this.isRented = isRented;
}

public boolean isRented() {
return isRented;
}

public String getRentedStatus(){
if(isRented){
return "Rented";
}
return "Not Rented";
}
}
48 changes: 48 additions & 0 deletions src/main/java/car/CarList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package car;

import java.util.ArrayList;

public class CarList {

public static ArrayList<Car> carsList = new ArrayList<>();

public static ArrayList<Car> getCarsList() {
return carsList;
}

public static void addCar(Car car) {
carsList.add(car);
System.out.println("Car added to list");
System.out.println("Car details:");
System.out.println(car.getModel() + " | " + car.getLicensePlateNumber()
+ " | $" + car.getPrice() + " | " + car.getRentedStatus());
}

public static void removeCar(String carLicensePlateNumber) {
Car carToRemove = null;

// Iterate through the list of cars to find the one with the given license plate
for (Car car : carsList) {
if (car.getLicensePlateNumber().equals(carLicensePlateNumber)) {
carToRemove = car;
break;
}
}

// Remove the car if it exists
if (carToRemove != null) {
carsList.remove(carToRemove);
System.out.println("Car with license plate " + carLicensePlateNumber + " removed from list.");
} else {
System.out.println("No car found with license plate " + carLicensePlateNumber);
}
}
public static void printCarList(){
System.out.println("Here are the current cars in the company");
for(int i = 0 ; i < carsList.size(); i++){
Car car = carsList.get(i);
System.out.println( (i + 1) + ") " + car.getModel() + " | " + car.getLicensePlateNumber()
+ " | $" +car.getPrice() + " | " + car.getRentedStatus());
}
}
}
47 changes: 47 additions & 0 deletions src/main/java/customer/Customer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package customer;

/**
* Represents customers of CliRental
*/
public class Customer {

private String username;
private int age;
private int contactNumber;

public Customer(String username, int age, int contactNumber){
this.username = username;
this.age = age;
this.contactNumber = contactNumber;
}

public String getUsername() {
return username;
}

public int getContactNumber() {
return contactNumber;
}

public int getAge() {
return age;
}

public void setUsername(String username) {
this.username = username;
}

public void setAge(int age) {
this.age = age;
}

public void setContactNumber(int contactNumber) {
this.contactNumber = contactNumber;
}

public String toString(){
return "Username : " + this.getUsername() + "\n"
+ "Age : " + this.getAge() + "\n"
+ "Contact Number : " + this.getContactNumber();
}
}
36 changes: 36 additions & 0 deletions src/main/java/customer/CustomerList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package customer;

import java.util.ArrayList;

public class CustomerList {

public static ArrayList<Customer> customers = new ArrayList<>();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent naming through the codebase: customers v.s. carsList.
It would be good if this is consistent throughout the codebase.


public static void addCustomer(Customer customer){
customers.add(customer);
System.out.println("Customer added");
System.out.println(customer.toString());
}

public static boolean removeCustomer(String username){
for(Customer customer : customers){
if(customer.getUsername().equals(username)){
customers.remove(customer);
return true;
}
}
return false;
}

public static ArrayList<Customer> getCustomers() {
return customers;
}

public static void printCustomers() {
for (Customer customer : customers) {
System.out.println(customer.toString());
System.out.println("____________________________________________________________");
}
}
}

22 changes: 22 additions & 0 deletions src/main/java/exceptions/CarException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package exceptions;

public class CarException extends RuntimeException{

private static final String ADD_CAR_FORMAT = "add-car /n [CAR_MODEL] /c [CAR_ID] /p [PRICE]";

public CarException(String message) {
super(message);
}

public static CarException addCarException() {
String message = "Unable to add car.. Refer to correct format below:\n" +
ADD_CAR_FORMAT;
return new CarException(message);
}

public static CarException invalidPrice() {
String message = "Unable to add car.. Price cannot be negative!!";
return new CarException(message);
}

}
10 changes: 10 additions & 0 deletions src/main/java/exceptions/CliRentalException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package exceptions;

public class CliRentalException extends Exception {
public CliRentalException(String message) {
super(message);
}
public static CliRentalException unknownCommand() {
return new CliRentalException("OOPS!!! Invalid command!");
}
}
24 changes: 24 additions & 0 deletions src/main/java/exceptions/CustomerException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package exceptions;

/**
* Customer related exceptions
*/
public class CustomerException extends RuntimeException {

public static final String ADD_FORMAT = "add-user /u [USERNAME] /a [AGE] /c [CONTACT_NUMBER]";

public CustomerException(String message) {
super(message);
}

public void printErrorMessage(){
System.out.println(getMessage());
}

/**
* Exception for the add-user command
*/
public static CustomerException addCustomerException(){
return new CustomerException("Unable to add customer. Please follow : " + ADD_FORMAT);
}
}
Loading
Loading