Answer to Question #158250 in C for qudsia

Question #158250

Jerri Khan Roadside Tea Stall

to the increase in the business Jerri has hired staff for various positions including cashiers and waiter to provide service round the clock.

Jerri found that it was easier to manage the shop by himself, but since the business has grown and number of staff are involved, he requires a mechanism to get a clear visibility of the day-to-day operations of the shop. He Jerri Khan established a roadside tea stall 1983. Over the years the number of customers and products have grown. Due has been recommended to put in a cheap computer with a software for the cashier’s desk.

Generally, people walk into the shop and take any available seat. The order is taken by the waiter. The customers can choose any item(s) mentioned in the menu (sample as follows).

 


The customers need to settle the bill as the cashier’s counter before leaving the premises. The cashier enters the items ordered by the customers into the system. This helps keep the detailed record of sales. A sample of the receipt is as follows: 

You are required to write console mode applications using C Programming for the following tasks.

Task #1 Marks 10

Write a to create a catalogue of products that are sold in the shop. The situation requires that you allow Jerri to:

  1. Add Items by Entering in real time.
  2. Add Items by Importing from plain text file
  3. Remove a single item
  4. Remove all items

Make sure that the items are uniquely identifiable.

Task #2 Marks 10

Write a program for the cashier(s) to allow them to record day-to-day transaction. The program should allow the cashier to add items to invoice from the catalogue created in Task #1. The invoice should contain:

  1. List of items purchased by the customer
  2. Unit price of each item
  3. Quantity purchased
  4. Subtotal of each item
  5. Total Value of all items purchased.

Task #3 Marks 10

Write a program that will allow Jerri to generate summarized report of the daily transaction. The report should contain following:

  1. Quantity of the items sold for every item on the catalogue
  2. Total of amount sales in Rupees for every item on the catalogue
  3. Sum of All the daily sales

Task #4 Marks 10

  1. Write a user manual for Task #1, Task #2, and Task #3.

Create user manuals to help train Jerri and the cashiers to use the system.

  1. Write a technical documentation for Task #1, Task #2, and Task #3.

Describe all the programs in detail.



1
Expert's answer
2021-01-26T05:33:47-0500
#include <stdio.h>
#include<stdlib.h>


int main(){
    int choice=1; // DECLARE VARIABLES 
    char yes='Y';
    int subtotal_T=0,subtotal_C=0,subtotal_A=0,subtotal_Cp=0,subtotal_M=0,subtotal=0;
    int item_num,quantity,temp;
    int Tea=10,Coffee=15,Arabi_parata=30,Chapata_parata=40,Meetha_parata=60;
    //print MENU
    printf("Welcome To Jerri Khan's Tea Stall\n");
    printf("----------------------------------\n");
    printf("---------- MENU ITEMS ------------\n\n1.Tea             - Rs.10 / cup\n2.Coffee          - Rs.15 / cup\n3.Arabi parata    - Rs.30 / plate\n4.Chapata parata  - Rs.40 / plate\n5.Meetha parata   - Rs.60 / plate\n");
    printf("----------------------------------\n");
    
    
    
    do{
    
        printf("Enter the item or product number you want to order :");
        scanf("%d",&item_num);
        switch(item_num){    //USE SWITCH STATEMENT FOR BILLING A PARTICULAR ITEAM
            case 1:    //BILLING of tea
                printf("Please enter the quantity: ");
                scanf("%d",&quantity);
                temp=quantity*Tea;
                subtotal_T=subtotal_T+temp;   //Total cost of Tea
                break;
            case 2:   //BILING of Coffee
                
                printf("Please enter the quantity: ");
                scanf("%d",&quantity);
                temp=quantity*Coffee;
                subtotal_C=subtotal_C+temp;  //Total cost of Coffee
                break;
            case 3:  //BILLING of Arabi_parata
                
                printf("Please enter the quantity: ");
                scanf("%d",&quantity);
                temp=quantity*Arabi_parata;
                subtotal_A=subtotal_A+temp;  //Total cost of Arabi_parata
                break;
            case 4:  //BILLING of Chapata_parata
                
                printf("Please enter the quantity: ");
                scanf("%d",&quantity);
                temp=quantity*Chapata_parata;
                subtotal_Cp=subtotal_Cp+temp;  //Total cost of Chapata_parata
                break;
            case 5:  //BILLING of Meetha_parata
                
                printf("Please enter the quantity: ");
                scanf("%d",&quantity);
                temp=quantity*Meetha_parata;
                subtotal_M=subtotal_M+temp; //Total cost of Meetha_parata
                break;    
            default:
                printf("You didn't make a valid choice\n");
                
                printf("Please select the item that you want to order with its iteam number 1-5\n");
            }
        printf("Would you like to order another iteam? 1(Yes) or 0(No) :");
        scanf("%d",&choice);
        
        if(choice==1){
             //DISPLAY SHOPPNG MENU
            
            printf("----------------------------------\n");
            printf("---------- MENU ITEMS ------------\n\n1.Tea             - Rs.10 / cup\n2.Coffee          - Rs.15 / cup\n3.Arabi parata    - Rs.30 / plate\n4.Chapata parata  - Rs.40 / plate\n5.Meetha parata   - Rs.60 / plate\n");
            printf("----------------------------------\n");
        }
    }while(choice==1);
    
    //display bill
    printf("---------------------------------------\n");
    printf("\n             BILL \n");
    subtotal=subtotal_T+subtotal_C+subtotal_A+subtotal_Cp+subtotal_M;
    printf("        Jerri Khan's Tea Stall\n");
    printf("            address:Mumbai\n");
    printf("            ph: 1234567890\n");
    printf("---------------------------------------\n");
    printf("Decription                  Price\n");
    printf("Tea                           %d\n",subtotal_T);
    printf("Coffee                        %d\n",subtotal_C);
    printf("Arabi parata                  %d\n",subtotal_A);
    printf("Chapata parata                %d\n",subtotal_Cp);
    printf("Meetha parata                 %d\n",subtotal_M);
    printf("---------------------------------------\n");
    printf("Total                      Rs.%d\n",subtotal);
    printf("    Thanks for shopping with us");

\

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS