Team members



Download 0.69 Mb.
Page1/2
Date22.11.2023
Size0.69 Mb.
#62677
  1   2
PPS PROJECT[1]



PROGRAMMING FOR PROBLEM SOLVING
21CSS101J
TEAM MEMBERS
BALRAM - RA23100302010079


TENDUL.S - RA2311003020095
AASEESH.A - RA2311003020106


ABSTRACT :-This C program represents a simple console-based ordering system for a restaurant (in this case, Domino's India). Users can select items from the menu by entering the corresponding item code and specifying the quantity. The program then calculates and displays the total bill based on the selected items and quantities.

Here's an overview of the program:


Structures:


struct MenuItem: Represents a menu item with a code, item name, and price. struct OrderItem: Represents an item in the order with a code and quantity.

Functions:


displayMenu: Displays the menu items with their codes, names, and prices. calculateBill: Calculates and displays the order summary along with the total bill.

Main Function:


Defines an array dominosMenu of MenuItem to store the menu items. Defines an array order of OrderItem to store the user's order.
Uses a loop to repeatedly prompt the user to enter item codes and quantities until the user enters "done" to finish the order.
Validates the entered item codes and quantities and adds them to the order array. Calls the calculateBill function to display the order summary and total bill.

Usage:
The user is prompted to enter item codes to add items to their order.


The program validates the entered codes against the menu and allows the user to input quantities.
The order is stored in the order array.
The order summary and total bill are displayed after the user enters "done."

Potential Improvements:


Error handling could be enhanced (e.g., handling invalid quantity inputs).
The program assumes a fixed size for the order array (10 items), which may be insufficient for larger orders.
More sophisticated input validation and error handling could be implemented for better user experience.
Overall, it's a simple and functional program for a basic ordering system.



Download 0.69 Mb.

Share with your friends:
  1   2




The database is protected by copyright ©ininet.org 2024
send message

    Main page