Code Monkey home page Code Monkey logo

bamazon's Introduction

Welcome to Bamazon

  1. Uses a MySQL Database called bamazon_db.

  2. bamazon_db contains a table inside of it called products.

  3. The products table has each of the following columns:

    • item_id (unique id for each product)

    • product_name (Name of product)

    • department_name

    • price (cost to customer)

    • stock_quantity (how much of the product is available in stores)

  4. The database has about 19 different items.

  5. Start bamazon's CLI bamazonCustomer.js. Running this application will first display all of the items available for sale. Include the ids, names, and prices of products for sale.

  6. The app should then prompt users with two messages.

    • The first should ask them the ID of the product they would like to buy.
      • The user will then be prompted to confirm that they've selected the desired item (Y/N).
    • The second message will ask how many units of the product they would like to buy.
  7. Once the customer has placed the order, the application will check if the store has enough of the product to meet the customer's request.

    • If not, the app will log Sorry, Insufficient inventory, and then a message will appear asking if customer would like to proceed with their order (Y/N). If customer selects 'NO', the connection will end. If the customer selects 'YES', the prompt cycle will start over.
  8. However, if the store DOES have enough of the product, the customer's order will be fulfilled and will display the total of the purchase.

Happy Shopping

bamazon's People

Contributors

jessicavc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.