Name, purchase price, group, volume, composition, pcs. ================================================= ========= "Mineral water is Good", 9.99, "mineral waters", 0.3, "mineral water, medical-table", 570 "Mineral water is Good", 15.47, "mineral waters", 1.5, "mineral water, medical-table", 412 "Juice Rich Grapefruit", 22.00, "juices", 0.95, "water, grapefruit juice concentrated, fructose, citric acid", 156 "Energy Boom Plus", 24.15, "other drinks", 0.33, "water, citric acid, Apple flavor, E-345, E-120, E-630, E-632, dye Cherry", 78 and for this type: name, purchase price, classification (wine, strong alcohol, beer, liqueurs), volume, strength of the drink, the presence of pieces. ================================================= === Martini Bisse, Liqueurs, 205.00, 1.0, 13%, 12 “Two seas”, 195.00, “wine”, 0.75, 12%, 0 "Odessa New Beer", 13.25, "beer", 0.5, 4.3%, 120 "Red Spaniard", 80.00, "wine", 0.75, 14%, 92 Write a program to emulate the operation of the store selling drinks in Java / C #. When performing a task, use version control systems (GitHub, Bitbucket ...). For verification, you will need to provide a link to the repository with the task. The shop sells alcoholic and non-alcoholic beverages. For alcoholic beverages, the database contains the following information: name, purchase price, classification (wine, spirits, beer, liqueurs), volume, strength of the drink, the presence of pieces; for non-alcoholic beverages: name, purchase price, group (mineral waters, juices, other drinks), volume, composition, availability of pcs. Information about the assortment of goods (database) is stored as a CSV file, the contents of which has something like the following: "Mineral water is Good", 9.99, "mineral waters", 0.3, "mineral water, medical-table", 570 "Mineral water is Good", 15.47, "mineral waters", 1.5, "mineral water, medical-table", 412 "Odessa New Beer", 13.25, "beer", 0.5, 4.3%, 120 "Red Spaniard", 80.00, "wine", 0.75, 14%, 92 "Juice Rich Grapefruit", 22.00, "juices", 0.95, "water, grapefruit juice concentrated, fructose, citric acid", 156 "Energy Boom Plus", 24.15, "other drinks", 0.33, "water, citric acid, Apple flavor, E-345, E-120, E-630, E-632, dye Cherry", 78 Martini Bisse, Liqueurs, 205.00, 1.0, 13%, 12 “Two seas”, 195.00, “wine”, 0.75, 12%, 0 In the process of selling goods, there is a mark-up of value according to the following rules: ● Standard margin is 10% of purchase price. ● On weekends, the margin is 15% of the purchase price ● Between 18:00 and 20:00, the margin is 8% of the purchase price (weekends and weekdays) ● When selling from two units of goods at a time, the margin on the following units of goods is reduced to 7% of the purchase price The shop is open from 08:00 to 21:00 every day. At the end of each day, goods are purchased in the amount of 150 pieces. for each position, the presence of which is less than 10 pcs. It is necessary to write a program that will emulate the work of this store and after emulating the work of one month (30 days) will prepare a profit report: ● At the start of the program, the program loads an existing CSV file to obtain information about the assortment and current availability of goods. ● Every hour from 1 to 10 customers come to the store, who purchase from 0 to 10 units of random goods. The sale price of goods is formed in accordance with the above described rules for the mark-up value. Information about each sale is displayed in the console during the program operation (what is sold, the sale price of each unit, what margin rules are applied). ● At the end of the working day, additional goods are purchased. ● After emulation of 30 days, the program saves a report in a text file, which contains information: ● Quantity of goods sold for each item; ● Quantity of pre-purchased item for each item; ● Store profit from sales (amount of sales minus cost of goods sold); ● Spent funds for the purchase of goods. ● At the end of the program, the CSV file is overwritten (the information on the availability of goods at the end of the program is updated).
- oneDo you need help to create a database schema or think up a way to generate a schema automatically from random data? - Sergey Ignakhin
- I want to transfer this all to sql only on a shelf, so that I could then work seamlessly with this data - Sergey
- That is, you have a ready-made database and you just need to parse the data from CSV. I understood everything correctly? - Sergey Ignakhin
- "Martini Bisse", "liqueurs", 205.00, 1.0, 13%, 12 - this is the element of the database, but I don’t know how to properly rotate and put all these lines in the database - I'm a beginner ( - Sergey
- Now I will write you a project for example - Sergey Ignakhin
|