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

Conversation

tkhahns
Copy link

@tkhahns tkhahns commented Oct 1, 2024

CliRental helps manage a car rental business that handles 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.

Copy link

@tzerbin tzerbin left a comment

Choose a reason for hiding this comment

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

Good effort in following the coding standards!
Please make the necessary changes such that it follows more closely!


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.

String username = parameterContents[0];
int age = Integer.parseInt(parameterContents[1]);
int contactNumber = Integer.parseInt(parameterContents[2]);
return new Customer(username , age, contactNumber );
Copy link

Choose a reason for hiding this comment

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

Be mindful about the horizontal whitespace you use throughout the codebase.

Suggested change
return new Customer(username , age, contactNumber );
return new Customer (username , age, contactNumber);

return userInput;
}

public static boolean parse(String userInput) throws CliRentalException {
Copy link

Choose a reason for hiding this comment

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

Boolean methods should start with is/has/etc.
Consider using more exceptions and asserts to assist with making sure the method runs successfully.

System.out.println("Goodbye!");
}

public static void getName(){
Copy link

Choose a reason for hiding this comment

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

Readers would normally expect a Name return type for a method named getName.
Consider renaming this method.
This issue is apparent throughout the codebase.


public class Transaction {
private static int transactionCounter = 1;
private final String transactionId;
Copy link

Choose a reason for hiding this comment

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

Final attributes should be named with SCREAMING_SNAKE_CASE.

return false;
}

public static void addTx(Transaction transaction) {
Copy link

Choose a reason for hiding this comment

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

Be consistent with the naming "Tx" and "transactions". The latter would be more appropriate.

public class CustomerListTest {

@Test
public void testAddCustomer() {
Copy link

Choose a reason for hiding this comment

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

Please follow the naming convention for tests.

@@ -2,21 +2,43 @@

## Acknowledgements

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links
to the original source as well}

Choose a reason for hiding this comment

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

Could add a contents page here for easy reference for the DG


![Local Image](UML/CLiRental.png)

Choose a reason for hiding this comment

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

Should you add all the other classes in your main/java/car folder?


The following sequence diagram will explain the sequence of events after the user inputs an add-user command.

![Local Image](UML/AddCustomerSequence.png)

Choose a reason for hiding this comment

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

Nice use of numbers to explain sequence of events for long and complicated diagrams

{Describe the value proposition: what problem does it solve?}
Our product, CliRental aims to allow quick adding of transactional data when renting out a car in a car rental
company/store. It also allows for the staff of the rental company to filter through the massive amount of transactions,
finding the transaction they are looking for easily with multiple filters.

## User Stories

Choose a reason for hiding this comment

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

Could update these sections for the final version as they are needed

start of the program. The carData.txt will be created if it does not exist at the start of program and its data will be
loaded if the file exist.

![Local Image](UML/CarFileLoader.png)

Choose a reason for hiding this comment

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

I would consider adding a few more UML diagrams if possible.

follow the format of the AB3
https://se-education.org/addressbook-level3/UserGuide.html

Copy link

@tzerbin tzerbin left a comment

Choose a reason for hiding this comment

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

Good attempt on updating your DG.
There are small issues pertaining your diagrams, please make sure that the diagrams communicate how your software is implemented.
Some information are missing due to lack of architecture / class diagrams.
Do complete your DG - some sections are empty.


## Design & implementation

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
The following is our class diagram for our whole project.
Copy link

Choose a reason for hiding this comment

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

An architecture diagram would be more suitable to describe the whole project.
This class diagram can be used to discuss how Customer class is being used in the project.

CliRental class seems to be very out of place here.
Do take note of the usage "Void" v.s. "void", "String" v.s. "string".
Do include multiplicity as well.
The class diagram seems to suggest aggregation instead of composition.


The following sequence diagram will explain the sequence of events after the user inputs an add-user command.

![Local Image](UML/AddCustomerSequence.png)
Copy link

Choose a reason for hiding this comment

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

Good attempt on the sequence diagrams.
However, there may be too many information within the diagram. Perhaps omit details that involve the Java API e.g. method calls to ArrayList.


The following sequence diagram illustrates a **valid** `add-car` operation:

![](./images/RyanAddCarDiagram.png)
Copy link

Choose a reason for hiding this comment

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

Is there a reason why there are different software for creating sequence diagrams?


The following class diagram shows the interaction between the classes involved:

![](./images/RyanClassDiagram.png)
Copy link

Choose a reason for hiding this comment

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

It would be better to explain the classes involved first before showing sequence diagrams.
Multiplicities can be improved to both sides of an association.
Double-check with the composition: If CarList is destroyed, why would instances of Cars be destroyed too?
Double-check with dependencies: Does CarParser use CarList?

Copy link

@Ridiculouswifi Ridiculouswifi left a comment

Choose a reason for hiding this comment

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

Good first draft! When updating the developer guide, I think it would be good to adhere to the same format if possible.


![](./images/list-rented-output.png)

Step 5: **Optionally**, the user can also execute

Choose a reason for hiding this comment

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

I like the explanation of this process in steps, it helps to make it more readable.



Step 3: A customer decides to rent a car from the company. The user then uses the application to track
and record the transaction details. The user executes the `add-tx ...` command to add

Choose a reason for hiding this comment

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

Perhaps it would be better to have an example for this command, as it is not mentioned before in this document.


Example:

![](./images/list-cars-output-before.png)

Choose a reason for hiding this comment

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

Perhaps it would be better to use the same software for creating sequence diagrams to ensure consistency.


![Local Image](UML/CLiRental.png)

Choose a reason for hiding this comment

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

Perhaps it would be better to leave out the minor utility methods such as the getters and setters as the class diagram does look quite cluttered.


The following sequence diagram will explain the sequence of events after the user inputs an add-user command.

![Local Image](UML/AddCustomerSequence.png)

Choose a reason for hiding this comment

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

image

Perhaps line 14 should be dotted instead? Given that it shows the function CustomerException returning to the activation bar of CustomerParser.

image

Seems like the arrow for line 21 is in the wrong direction.


![Local Image](UML/AddCustomerSequence.png)

2. `Creating Car file and loading file`

Choose a reason for hiding this comment

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

image

Seems like there was an error when rendering the document, it should be 2. instead of 1.

rexkoh425 and others added 30 commits November 12, 2024 13:08
Slight modification of UG, DG, and upload team members' photos
Update AboutUs.md - Final PR
Fix Kenneth's PPP link error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants