Assignment No. 1
Assignment No. 1
Instructions
1. Understanding the problems is part of the assignment. So, no query, please.
2. You will get zero marks if found any type of plagiarism or AI generated code.
3. No submission after due date.
4. Upload pdf file containing your code and screenshots of outputs.
Q1: You are tasked with developing a florist ordering system that enables customers to order
bouquets based on their preferences. The system should provide an easy-to-use interface for
selecting bouquet size, flower type, and color while calculating the price based on the user's
choices. Additionally, the system should track sales statistics, helping the florist manage their
business more effectively.
Functionality:
1. Main Menu: The program displays a main menu that offers three options: placing an order for
a bouquet, viewing sales statistics, or exiting the program. The menu should be user-friendly
and allow users to navigate easily between options. After executing an option, the program
clears the screen and returns to the main menu until the user decides to exit.
2. Order Bouquet: This function allows users to select a bouquet size (Small, Medium, or
Large), choose a flower type (e.g., Rose, Lily, Carnations), and pick a flower color (e.g., White,
Red, Pink). The function calculates the bouquet's price using the specified formula:
Price = (Flower Price + Color Price) × Size Price.
The function ensures that a maximum of 10 orders can be placed. If the limit is reached, it
informs the user that no additional orders can be accepted. The screen is cleared after each
selection to enhance user experience.
3. Sales Statistics: After placing orders, users can view detailed sales statistics through a
submenu. This submenu includes several functions:
3.1. Number of Bouquets Sold by Size: This function displays the count of bouquets sold
categorized by size (Small, Medium, and Large).
3.2. Number of Bouquets Sold by Flower Type: This function provides a count of bouquets
sold categorized by flower type (Rose, Lily, Carnations, Daffodil, Gerbera,
Chrysanthemum, and Assorted).
3.3. Number of Bouquets Sold by Color: This function shows the count of bouquets sold
categorized by color (White, Red, Pink, Yellow, Blue, and Mixed).
3.4. Statistics of the Day: This function calculates and displays the day's sales statistics,
including the minimum, maximum, and average prices of bouquets sold, the total number
of bouquets sold, and the total sales amount. If no orders have been placed, the function
notifies the user accordingly. The screen is also cleared before displaying the statistics.
3.5. Back to Main Menu: By selecting this option, user will be returned back to main menu.
Each of these functionalities should be implemented as a separate function of class for clarity and
maintainability.
1. Bouquet Sizes:
2. Flower Types:
Constraints:
1. Users can only select from predefined options for bouquet size, flower type, and color.
2. Input validation is necessary to ensure that user selections are within acceptable ranges. If an
invalid option is selected, prompt the user to enter a valid choice.
3. The system must limit the total number of orders to a maximum of 10. Once this limit is
reached, inform the user that no more orders can be placed.
4. Each functionality must be implemented as a separate function within the class for better
organization and code clarity.
5. The screen should be cleared when moving to the next option to improve user experience.