Firstly, compile the main file, which will also compile the entire package:
java Code/Main.java
java Code.Main
In this case, we will use certain data in .txt format available in the "Dados" folder.
java Code.Main -txt Code/Dados
After selecting an option, we can see data is already being accounted for in the app:
The app assumes the current day is the day it was firstly executed, however, you can skip a number of given days or even jump to a specific date using the last available option:
When a user jumps forward in time (jumping back isn't allowed) the app behaves like it would in a real-world scenario, which means if there are orders wich delivery is in process, the items may have already been received by the user if the time it takes for the company to deliver its packets is less than the time the user skipped forward.
If a given item or collection of items is returned or has been succesfully delivered to a given user, then it disappears from the app inventory, which means that the app assumes that once a seller as one of its items returned after being succesfully bought and delivered, it must be once again posted in the app if the vendor still wants to sell it afterwards. Once a items is successfully sold, both the vendor and the buyer get a receipt listing all items sold/bought and their informations.
Dealing with buyers placing an order in which different items must be dispatched by different carriers
In this case, suborders are created in which each suborder as the same id, in order to identify the original purchase, and the sold items are grouped by shipping company.
This is an example of an order that was splitted in two when originally created, due to the fact of it having to be distributed by two different shipping companies.
The formats of product, user, shipping company, and order codes were designed to optimize query resolution time. For instance, the product code is generated by concatenating a 6-digit seller ID and a unique 6-digit product identifier. The product identifier consists of a counter that increments with each new product added to the application's inventory:
When the the user choses to leave the menu, he his prompted to save the new data altered by him while using the app. The most recent data will be stored in the "Last save" folder. If there is more than one save, the second most recent save will also be saved in the "Older Save" folder. All saves are written in binary files.
In order to add new data to the intial state of the app, you can write this data in the txt files, using the correct format for each new object to be created. As an example, this is how you would create the first products the app would have at launch:






