Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A simple c++ program thanks in advance 9:18 PM @ 31% LO Binary files and pointers to struct rn A supermarket owner is trying to

A simple c++ program thanks in advance
image text in transcribed
9:18 PM @ 31% LO Binary files and pointers to struct rn A supermarket owner is trying to build a program to process the database of his store. He has a grocery item which can be described by name (string) price(int) and type whether it is vegetable or fruit (char) and its weight (float) and calories(int) and number of items in stock(int). Also customers should be able to place orders and each order is described by (order number(int), items (array of items described above), and date). Date is described by day, month and year a. First of all the user should enter the items available in the grocery (at least you should have 10 items). b. The user should enter the number of orders he wants to place and the number of items per order c. The user should enter the order details with item details. d. The order should be saved to a binary file. e. The user should be able to search for a certain order by id and output its details on screen. f. The user should be able to search for a certain grocery item by name and check whether it's available or not (if not available in stock then he should get that it's not available on screen). g. Do the above once again but using text files. h. The user should have four files(order.txt and order.bin) for orders database and (items.txt and items.bin) for items database i. The functions you should have at least are i. Save item to binary file ii. Search for item in a binary file ii Save order to a binary file iii. Read order from a binary file v. The above is done by text files also

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions