| title | RPOS System Project Report |
|---|---|
| date | September 24, 2018 |
\newpage
- Java 8 or higher
- MySQL
You have to create a database for the system.
Go to src/main/database/init.sql and run the file (or copy paste its content to mysql), this will create a database named rposdb and a user named javadbc in the localhost with password 0000.
This step also creates a user in the system named admin with password 0000, use it to login to the system.
BillPanelclass is huge, tightly coupled and implements too much functionality (breaks the single responsibility principle), this is largely due to the deadline, it had to be done quickly and with no prior design. It should be refactored as follows:- Text fields validation is done inside the class, this could be moved into it's own class.
Create a class that extends a
JTextFieldand extend it to provide validation (like a customPositiveIntegerFieldthat is aware of its state (valid or not) and converts its value to integer on request). - The bill panel has three panels: items, cart, and information panels. Each of these could be implemented as a standalone panel.
- The
itemsListandcartTablecould be their own classes which extendJListandJTablerespectively, or atLeast implement aListModeland aTableModelto customize their functionality in an encapsulated and abstracted way. currently the way they (and their events) are implemented (and handled) is adhoc and inflexible.
- Text fields validation is done inside the class, this could be moved into it's own class.
Create a class that extends a
DBControllerclass does not abstract the connection in a proper way. This is evident in the model classes (UserModelandItemModel). This can be fixed by executing the statements in the controller instead of in the model classes.
Currently the bill model is not implemented (i.e, bills are not tracked nor stored in the database). Once a bill is cleared all its data is lost for good.
This includes but is not limited to:
- Implementing the admin frame (dashboard).
- Creating the rest of the cashier dashboard (sales info, items search).
Current print function only prints the table this should print the whole bill (with the information included and a header) instead.