Products should be delivered to fictional stores. There's no store backend instance.
Product amount is unspecified. Just make sure that each store get what they are selling - one product can be delivered to multiple store, if needed.
After products are delivered a report should be printed to list stores with their assortment. The list of stores:
Grocery store (place that sells food)
Hardware store (place that sells tools)
Computer store (place that sells computers)
Gun shop (guns and ammo)
Wallmart (place that sells everything except guns)
product categories are:
food, tools, computers, guns, ammo
The attached file contains products definitions with attributes name and category in tlv format. The file doesn't contain garbage so no error handing is needed. However it's not forbidden either.
The tlv format specification is following:
length in bytes | description
1 | tag
1 | length
<length> | value
The tag description is following:
product tag = 0x81
product category tag = 0x02, value type is string
product name tag = 0x03, value type is string
If the tag identifier's most significant bit is on it means that the value data consist multiple tlv values.
Example of one product:
81(tag) 0C(length) |02(tag) 04(length) 666f6f64(data) 03(tag) 05(length) 6170706c65(data)|
I am new to Java, know how to read text from csv file but don't have an idea, how to read in tlv. Any clue or help will be highly appreciated. The rest of the task I can do it myself. I have posted the whole task description just to give an understanding of what it is.