Question: Solve all these questions. Note: All member variables are private, Object 1Ds start from 225 ouvarde. In your main function, create, populate and display the

Solve all these questions.
Solve all these questions. Note: All member variables are private, Object 1Ds
start from 225 ouvarde. In your main function, create, populate and display
the folloning objects using a combination of parameterized constructors and user input

Note: All member variables are private, Object 1Ds start from 225 ouvarde. In your main function, create, populate and display the folloning objects using a combination of parameterized constructors and user input as per the disgram above: - An EletComp object - An array of 3 Msrmntbves Using the static count variable, also display the total number of objects created. Question a - CI.O 3 - Marks =10 Tayek' Thenywhers thout and doubles Question 3 - CLO 3 - Marks = 15 Topic: File Handling. Part A) Your fricnd owns a hardware store. He has asked you for help in writing a program that keeps track of his store inventory. The file entries will contain a list of items with 2 fields: name and cost in rupees. Here is a sample of the text file a user may ereate: 7 inventorybat - Nereat File Ide fomut Virn Melp Hamer 4 ea Mrench 3 a2 Screwdriver 2se Sander 31e Note: This is just a sample file. Your file conteats will be different and will depend on the user. You are to write a program that ereates this file and continuously keeps asking the user to enter inventory items until they choose to save and close the document. Part D) Write another file that helps your friend generate bills for customers. Your code should: - Ask the user, one by one, to enter the item they need to purchase and in what quantity. - Filter out those items from the Inventory.txt file and write them into a new file called Bill.bxt which may look lilse this: BA thet-Nictepod Flen Edit Format Vies Melo Hanter 48e3 Wrench 3802 Glue 1604 - Calculate the total bill the customer owes and show this valse to the sercen. Question 4 ClO 4 - Marks =20 Topics: Dynamic Memory Allocation, Polymorphism You are to write a C++ program that designs and calculates the cost of fower arrangements for a wedding reception. Customers have the option of ordering cither a Bridal Boaquet or a Centerpiece. Both type of Alower arrangements can be ordered in cither basie or luxury categocies. Page 2 of 3 Bridal Bouquet Floters available = Roses, Tulips, Hydrangeas, Peoties, Snopdragans, Daisies - Basie =$250+$10 per manber of floter types chosen - Luxury =$450+$15 per number of flower types chosen CenterPieces - Basic =$5 - Luxury = \$17 ( +10$ for Gold Ribbon or 11$ for Silver, +15$ for Glass Vase) Note: Chastomers may ar may not choose to arder the ribbon and vase You may structure your code as follows: - Create a base class called Floweres which has: o Member variables to keep track of the type of flower arrangement (Basic or 1 anxary). - Virtual function called Deseription 0, which outputs a textual description of a Bridal Bouquet or Centerpiece object. - Virtual function called Compute_Price 0, which calculates the price of a single Bridal Bouquet or Centerpiece object based on the price chart shown above. - Derive a class called Bridal from the Flowers class which: - Uses dynamic memory to ask the user to enter which of the flower types they would like to include in their bouquet. The answer should be saved in an array of strings created dynamically - the customer can choose however many types they want out of the available choices. - Derive another class called Centerpieces from the Flowers class. Using concepts of Dynamic memory allocation and Polymorphism, your main function program should do the following: - Ask the user to input how many flower arrangements they would like to order. - Create a dynamieally allocated object array nsing a base class pointer. - For each pointer in the array, allocate either Bridal or Centerpeice objects and get user input for their specifications. - Output the total order in format of a bill/receipt of purchase which will describe the size and tye of the bouquet indicating the order specifics and also the grand total. Sample Demo Output: Greetings Customer and Welcome to Green Thumb Flower Shop! You have chosen to order: 1 Basic Bridal Bouquet with Roses, Hydrangeas and Poonies 1x Basic Centerpiece Tied with Gold Ribbon 1 x Luxury Bridal Bouquet wich Tulips and Peonies Your Total 1s: $775

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!