The Inventory Control System allows a business to keep track of its inventory and profits, allowing the owner to order supplies and track sales. Up to 10 different items can be tracked. Write a C program for the inventory control system with the following features: 1. The program uses an array of 10 structures. Each structure should hold the name of the item, the item identification number, the cost of the item, the number of items in stock, the total profit for the item and the total profit for all items. 2. The program must display the following heading and menu. You must use a do while loop and a switch case. The selection must NOT be case

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Menu do while and switch case
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
void myMenu(void);
int
main(void)
(
myMenu():
return(0);
}
void myMenu(void)
(
char choice;
do
(
puts("\n\n\n\t\t\tPlease select one of the
following options\n\n");
puts("\t\t\tA)To print I love programming");
puts("\t\t\tB)To print I hate programming");
puts("\t\t\tQ) To quit\n");
printf("\t\t\tPlease enter your choice: ");
}
scanf("%c", &choice);
choice = toupper(choice);
switch (choice)
(
case 'A': FunctionCallA();
break;
case 'B': FunctionCallB():
break;
case 'Q': FunctionCallC();
break;
default: printf("\n\t\t\tincorrect input, please
enter A, B or Q\n\n");
}
system("pause");
system("cls");
} while (choice != 'Q');
return;
Transcribed Image Text:Menu do while and switch case #include <stdio.h> #include <stdlib.h> #include <ctype.h> void myMenu(void); int main(void) ( myMenu(): return(0); } void myMenu(void) ( char choice; do ( puts("\n\n\n\t\t\tPlease select one of the following options\n\n"); puts("\t\t\tA)To print I love programming"); puts("\t\t\tB)To print I hate programming"); puts("\t\t\tQ) To quit\n"); printf("\t\t\tPlease enter your choice: "); } scanf("%c", &choice); choice = toupper(choice); switch (choice) ( case 'A': FunctionCallA(); break; case 'B': FunctionCallB(): break; case 'Q': FunctionCallC(); break; default: printf("\n\t\t\tincorrect input, please enter A, B or Q\n\n"); } system("pause"); system("cls"); } while (choice != 'Q'); return;
The Inventory Control System allows a business to keep
track of its inventory and profits,
allowing the owner to order supplies and track sales. Up
to 10 different items can be tracked.
Write a C program for the inventory control system with
the following features:
1. The program uses an array of 10 structures. Each
structure should hold the name of
the item, the item identification number, the cost of the
item, the number of items in
stock, the total profit for the item and the total profit for
all items.
2. The program must display the following heading and
menu. You must use a do while
loop and a switch case. The selection must NOT be case
sensitive.
Each selection should call a different function.
Inventory Control System
To choose a function, enter its letter label:
a) Show the name, identification number and number of
each item in stock,
including the cost of each item and total value of each
item in stock.
b) Allow the owner to enter the sale of an item
c) Show the number of units sold, the profit for each item
and the total store
profit
d) Allow the owner to order more of an existing item
e) Allow the owner to order new items
f) Quit
3. Assume that the selling price is 50% greater than the
latest purchase cost of an
item.
4. The program must successfully execute the premise of
the menu. Choices b) d) and
e) require additional input..
5. Data must be saved to a file. When the program is
restarted, it must first load the
last status of items in stock, their cost and profit.
6. No global variables allowed.
7. For each item you must keep track of the item's name
and Id number, latest
purchase price, number of items in stock, number of
items sold, total profit from
sales.
Use the following example code below when building
the menu part for the above C program
Transcribed Image Text:The Inventory Control System allows a business to keep track of its inventory and profits, allowing the owner to order supplies and track sales. Up to 10 different items can be tracked. Write a C program for the inventory control system with the following features: 1. The program uses an array of 10 structures. Each structure should hold the name of the item, the item identification number, the cost of the item, the number of items in stock, the total profit for the item and the total profit for all items. 2. The program must display the following heading and menu. You must use a do while loop and a switch case. The selection must NOT be case sensitive. Each selection should call a different function. Inventory Control System To choose a function, enter its letter label: a) Show the name, identification number and number of each item in stock, including the cost of each item and total value of each item in stock. b) Allow the owner to enter the sale of an item c) Show the number of units sold, the profit for each item and the total store profit d) Allow the owner to order more of an existing item e) Allow the owner to order new items f) Quit 3. Assume that the selling price is 50% greater than the latest purchase cost of an item. 4. The program must successfully execute the premise of the menu. Choices b) d) and e) require additional input.. 5. Data must be saved to a file. When the program is restarted, it must first load the last status of items in stock, their cost and profit. 6. No global variables allowed. 7. For each item you must keep track of the item's name and Id number, latest purchase price, number of items in stock, number of items sold, total profit from sales. Use the following example code below when building the menu part for the above C program
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education