Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You are required to write a program  in c++ that creates a mini database for a Botique,..... For this, create a structure Dress with fields

  • brand – string
  • fabric-- string
  • color - string
  • price - float
  • totalStock – int
  • avaiableQuantity--int
  • quantityToBuy – int // amount of pieces to buy.

You need to provide following functions in the struct

 

  1. Provide a function print() so that when called, this function prints the details about the Dress in formatted manner.
  2. IsAvailable(string brand) which checks the stock for the brand of dress in the botique if available then returns true otherwise false.
  3. You need to provide the function Buy(string brand, string fabric ).

This function represents the action of buying dress based on brand user selects available brands are (Nishat, Sana Safinaz, Saphhire, Khadi) and available fabrics are (Lawn, Cotton, Linen) also note down please check that the stock is available or not for required quantity ,for each type of brand price is different for different fabrics

  1. Nishat 3pc suit price is 4500 with fabric Lawn, For Cotton price will be 4000, and fro linen it is 3500.
  2. Sana Safinaz price would be 3500 For Lawn, for cotton is 2800, and for linen it is 3000,
  3. Saphhire 2500 for lawn, and 2200 for cotton and 3000 for Linen.
  4. Khadi it is 5500 for Lawn, 5000 for cotton and 6000 for linen.

If enough quantity is available only then dress can be bought otherwise error message will be shown.

Now create an array of 10 Dresses (different brand and fabric) Input the values from user.

Now do the following

  1. Print your Dresses collection,
  2. Ask the user which color, fabric and brand she wants for her (Nishat, Sana Safinaz, Saphhire, and Khadi). Check that enough quantity is available or not ( also update stock as well) for the chosen brand then print only that Dress details and the bill receipt to the user after adding 20% sales tax for Khadi, 15% for Saphhire, 10% for Sana Safinaz, 8% for Nishat.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY