Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to create a platform dedicated to connecting users with exciting BOGO ( Buy One Get One ) deals offered by restaurants. This

Your task is to create a platform dedicated to connecting users with exciting BOGO (Buy One Get One) deals offered by restaurants. This platform will make it effortless for people to discover and enjoy special offers from various restaurants, allowing them to savor delicious meals with the added bonus of getting another one for free.
Restaurant Class encapsulates key details and functionalities related to each restaurant. Features include: restaurant_name, location, menu_list, price_list, valid_coupon_codes_list, and coupons_redeemed_count (static variable), a static variable tracking the total number of coupons redeemed across all instances of the Restaurant class.
Restaurant class must have following member functions:
display_menu()
generate_bill()
apply_discount()
BOGOCoupon Class includes features related to coupons such as:
coupon_code: Alphanumeric code representing the unique identity of each coupon.
valid_from: The start date when the coupon becomes active.
valid_until: The expiration date marking the end of the coupon's validity.
restaurant_code: The prefix indicating the associated restaurant.
It must have the is_valid Method which validates whether the coupon is within its validity period. Also checks if the coupon is associated with the selected restaurant.
User Class must have the following attributes name, age, mobile_number, coupons_list: A list containing the BOGO coupons accumulated by the user, and redeemed_coupons_list.
It must have the following member functions:
Accumulate_coupon(): Adds a new coupon to the user's list, acquired through various activities or promotions.
Has_valid_coupon(): Checks if the user has a valid unredeemed coupon for a specific restaurant and item.
redeem_coupon(): Validates the coupon code and ensures it hasn't been previously redeemed.
Main Details:
Two restaurants, namely Food Haven and Pixel Bites, are established with distinctive characteristics. Food Haven, located in the City Center, offers a fusion of delightful dishes such as Sushi, Pad Thai, and Mango Tango. On the other hand, Pixel Bites, situated in Cyber Street, entices users with its Digital Delicacies like Binary Burger, Quantum Quinoa, and Data Donuts.
Users are invited to explore the diverse menu offerings of Food Haven and Pixel Bites through the display_menu method. BOGO coupons are introduced with restaurant-specific codes. For instance, a coupon with the code "FH-BOGO-12345" is associated with Food Haven, and another with "PB-BOGO67890" is linked to Pixel Bites. When placing an order, users employ the redeem_coupon process. The system validates the coupon code, ensuring it corresponds to the selected restaurant and has not been previously redeemed. Successful redemption allows users to enjoy a delightful BOGO offer on their orders, contributing to a rich and immersive dining experience.
write a c++ code
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago