Skip to content

T-yago/POO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 

Repository files navigation

How to use

Firstly, compile the main file, which will also compile the entire package:

java Code/Main.java

Executing the app without any starting products/delivery companies/users

java Code.Main

Executing the app with certain data - use txt or binary files

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:

image

The menu

image

Dates

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:

image

Note:

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.

Management of sold/returned items

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.

image

Optimizations

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:

image

Saving data and storing new app starting data

Saving data

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.

image

Storing new app starting data

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:

image

About

A project carried out at the University of Minho centered on the management and transactional handling of items in varying conditions within a marketplace resembling Vinted.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages