Write some software

Geschlossen Veröffentlicht vor 6 Jahren Bezahlt bei Lieferung
Geschlossen Bezahlt bei Lieferung

I need you to develop some software for me. I would like this software to be developed for Windows using C or C++. Implement a well-structured C program to enable a shop to maintain its small items inventory. The item information is

kept in a text-file, [login to view URL], of the form:

1007 5 30

1004 4 10

1003 3 20

1002 2 10

1006 4 40

1005 5 50

1001 1 70

1008 6 20

1010 4 90

1009 3 10

where each line of the text-file contains a unique itemID, the total item quantity available, and the price of item for 1 unit

in Saudi Riyals (SAR).

Note: The values given in the above file show that there is a total of 10 items. When the new item is added the default

value for the quantity is 10 which must be added by defining a constant.

The customer information is kept in a text-file, [login to view URL], of the form:

23 1007 3

44 1004 6

12 1007 1

23 1002 8

50 1007 1

50 1009 7

Where each line contains a customerID, the itemID, and the quantity of the item he purchased.

The values given in the file show that there are a total of 4 customers; e.g. the customer with ID 23 has purchased item

1007 with quantity 3 and item 1002 with quantity 8.

Your C program must have the following main menu:

1. Display Item Info for all Items

2. Display Item Info for a particular item

3. Display Customer Info for all customers

4. Purchase Item

5. Return Item

6. Add New Item

7. Delete Item

8. Exit

Please select your choice:

Page 2 of 4

Your program must loop as long as option 8 has not been selected. It must display an appropriate error message if an

invalid choice is entered. After executing each of the options 1 to 7, your program must pause and display the message:

“Press any key to continue . . .”. Your program must display the main menu after pressing any key. Each of the options

1 to 7 must be implemented in a separate function. The code for “Press any key to continue . . .” and the code for the

menu must also be implemented as separate functions.

The options must have the following behaviors:

Option 1: Display Item Info for all Items

It displays the item information of all items. The option must be implemented by reading directly from [login to view URL] text-file.

It then waits for any key to be pressed before returning control to the main menu:

Please select your choice: 1

ItemID Quantity Price Per Unit (SAR)

1007 5 30

1004 4 10

1003 3 20

1002 2 10

1006 4 40

1005 5 50

1001 1 70

1008 6 20

1010 4 90

1009 3 10

Press any key to continue . . .

Option 2: Display Item Info for a particular item

It prompts for and reads the itemID. It then searches for this itemID in the [login to view URL] text-file. If the item is not found an

appropriate error message is displayed, otherwise; the item information is displayed. In both cases, the option waits for

any key to be pressed before returning control to the main menu.

Please select your choice: 2

Enter itemID: 1002

ItemID Quantity Price Per Unit (SAR)

1002 2 10

Press any key to continue . . .

Please select your choice: 2

Enter itemID: 1342

Error: Invalid item ID

Press Enter key to continue . . .

Page 3 of 4

Option 3: Display Customer Info for all customers

It displays the customer information of all customers. The option must be implemented by reading directly from

[login to view URL] text-file. It then waits for any key to be pressed before returning control to the main menu:

Please select your choice: 3

CustomerID ItemID Quantity

23 1007 3

44 1004 6

12 1007 1

23 1002 8

50 1007 1

50 1009 7

Press any key to continue . . .

Option 4. Purchase Item

It prompts for and reads a customerID, itemID and the Quantity of the item to purchase. Each of the following must cause

an appropriate error message to be displayed:

 The customerID is not in the range 10 to 60 inclusive.

 The itemID is not in [login to view URL]

 There is not enough quantity available for the item to purchase.

Otherwise the contents of the text-file [login to view URL] are copied into parallel arrays ItemID, ItemQuantity, and PricePerUnit

(count the number of lines in the text-file, and use this number as the array size). The number of purchased items for the

item is deccremented, and the [login to view URL] text-file is then updated. Also a new customer entry, containing the customerID,

itemID, and the Quantity is appended to the [login to view URL] file.

Control is returned to the main menu after pressing any key.

Option 5: Return Item

It prompts for and reads a customerID, itemID and the Quantity of the item to return. Each of the following must cause an

appropriate error message to be displayed:

 The customerID is not in the range 10 to 60 inclusive.

 The customerID, itemID and Quantity pair is not in [login to view URL] (There may be multiple entries but search

for the first entry only).

Otherwise the contents of the text-file [login to view URL] are copied into parallel arrays ItemID, ItemQuantity, and PricePerUnit

(count the number of lines in the text-file, and use this number as the array size). The number of returned items for the

item is incremented, and the [login to view URL] text-file is then updated. The contents of [login to view URL] are copied into

integer parallel arrays CustomerID, ReturnedItemID and Quantity (count the number of lines in the text-file, and use this

number as the array size), the [login to view URL] file is then updated not to contain this pair entry.

Control is returned to the main menu after pressing any key.

Page 4 of 4

Option 6: Add New Item

It prompts for and reads the itemID and the price per unit of the new item. An appropriate error message must

be displayed if the itemID already exists in [login to view URL] file; otherwise the new item entry is appended to [login to view URL]

with a maximum quantity as defined by a constant.

Control is returned to the main menu after pressing any key.

Option 7: Delete Item

It prompts for and read the itemID to be deleted. Only items that have maximum quantity can be deleted. Any

of the following must cause an appropriate error message to be displayed:

 The itemID does not exist in [login to view URL] file.

 The itemID exists in [login to view URL] file but the quantity is not maximum.

Otherwise the contents of [login to view URL] are copied into parallel arrays ItemID, ItemQuantity, and PricePerUnit (count the

number of lines in the text-file, and use this number as the array size) and then the [login to view URL] file is updated not to contain

the deleted item entry.

Control is returned to the main menu after pressing any key.

C Programmierung C++ Programmierung Softwarearchitektur Windows Desktop

Projekt-ID: #15937456

Über das Projekt

28 Vorschläge Remote Projekt Aktiv vor 6 Jahren

28 Freelancer bieten im Durchschnitt $74 für diesen Job

utkarshkatiyar19

hi. i have understood your requirement very well. i am sure that i can do it is easily. Relevant Skills and Experience C, C++ Proposed Milestones $80 USD - done

$80 USD in 2 Tagen
(413 Bewertungen)
7.5
hbxfnzwpf

100USD for this project. Relevant Skills and Experience I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and m Mehr

$100 USD in 2 Tagen
(212 Bewertungen)
7.3
kcbStar

Hello, I am interested in this project and so wanted to discuss more it in details. I sincerely hope that you will believe me and hire me. Thanks Relevant Skills and Experience C Programming, C++ Programming, Software Mehr

$25 USD in 1 Tag
(132 Bewertungen)
6.5
waleedibrahim92

Hey I have similar idea project before. It will be done using linked lists Relevant Skills and Experience Please contact me for more details. Proposed Milestones $45 USD - code

$45 USD in 1 Tag
(45 Bewertungen)
5.3
expertatwork

Yes, this is a simple C program!

$40 USD in 2 Tagen
(78 Bewertungen)
5.5
manhpham

Hi there, I am C++ expert and I am willing to help you to do this assignment Relevant Skills and Experience C++ Proposed Milestones $40 USD - milestone

$40 USD in 1 Tag
(37 Bewertungen)
5.0
BeshoyMousaKhair

. Relevant Skills and Experience . Proposed Milestones $30 USD - .

$30 USD in 1 Tag
(51 Bewertungen)
5.0
Shankarone

I can complete this project in 2 days(console application.) I'll do it in C++ so let me know if I can start working on it. Relevant Skills and Experience . Proposed Milestones $66 USD - task completion

$66 USD in 1 Tag
(34 Bewertungen)
4.7
mzlst50

c/c++ expert std,stl , data structure and object oriented. please visit my profile to see the completed jobs and clients review Relevant Skills and Experience c/c++ expert std,stl , data structure and object oriented. Mehr

$25 USD in 1 Tag
(21 Bewertungen)
5.7
mukeshjap

Hi ! As I have seen your above explained requirements for yours projects. Relevant Skills and Experience Hi ! As I have seen your above explained requirements for yours projects. Stay tuned, I'm still working on thi Mehr

$222 USD in 15 Tagen
(11 Bewertungen)
4.0
parthyshah

Hello, I have 4.5 years of professional experience in embedded domain (c language). We can negotiate on price. Kindly consider my proposal request.

$277 USD in 10 Tagen
(3 Bewertungen)
2.6
sridharmohanty

I have good knowledge on c,c++,c#,java,python. Eager to work on this project. Relevant Skills and Experience na Proposed Milestones $34 USD - na na

$34 USD in 1 Tag
(0 Bewertungen)
0.0
enghammad2016

computer engineering Relevant Skills and Experience c ,c++, C# , java, php , android Proposed Milestones $27 USD - c programmer

$15 USD in 1 Tag
(0 Bewertungen)
0.0
usamaabbas3632

Hi dear, hope you are fine. I am offering my skills here. I can solve your task. Thanks. Relevant Skills and Experience I can show you my previous work. Proposed Milestones $15 USD - Completion

$15 USD in 1 Tag
(0 Bewertungen)
0.0
ioanstanciu2000

A proposal has not yet been provided

$111 USD in 5 Tagen
(0 Bewertungen)
0.0
mohdsajjad56

I have been working as trainer and have implemented lot of such projects. I can deliver you this project in 4 days. I am here in KSA and you can contact me on 0581513926 for details. Relevant Skills and Experience I h Mehr

$55 USD in 4 Tagen
(0 Bewertungen)
0.0