Skip to content

A basic application that allows you to shop and explore freely.

Notifications You must be signed in to change notification settings

PositionV2024/Hotel_app

Repository files navigation

Update logs - 26/6/2024

Added support for multiple item removal Items removed Items removed
Added support for a item removal Shopping cart After removing mango from the shopping cart
Added level Level
Added shopping cart Shopping cart
Added order history Order history

Details of the project


This is meant to be a hobby project. When this application is executed in the IDE (Integrated Development Environment), you can choose four options. You can either: explore the hotel shop; look up your order history; top up more cash to your account; or exit the program. Before choosing the first option, you will need to top up more cash in your account. By default, this is set to 0. After you have successfully topped up your account, you are ready to make a purchase. Head over to the "Hotel Shop" option to explore various products. Each product will have its own price; you can purchase as much as you want, as long as the funds are sufficient. After you have purchased an item, you can check what you have bought. Head over to the "List down your order." option to see what you have bought; this will show you how much you have spent on each item.

Part of the code
                if (option_input == 1)
            {
                if (item_quantity >= 1)
                {
                    final_order = "x" + to_string(item_quantity) + " " + shop_options.at(item_recorded) + "(s)" + " / " + prefix + to_string(result);
                    
                    shopping_cart.push_back(final_order);
                    
                    item_names.push_back(shop_options.at(item_recorded));
                    items.push_back(item_quantity);
                    item_prices_.push_back(result);
                    
                    cout << "Successfully added x" << item_quantity << " " << shop_options.at(item_recorded) << " to shopping chart." << endl;
                    
                    hotel.options.at(5) = "Check shopping cart (" + to_string(shopping_cart.size()) + ")";
                } else {
                    cout << "Error: Couldn't add to basket." << endl;
                }
            }

Short demo

Watch the video

Video

Full video (1:20)

Made by Clarence

About

A basic application that allows you to shop and explore freely.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages