You friend, Cathy has a small business and knowing that you have taken a program
ID: 3645652 • Letter: Y
Question
You friend, Cathy has a small business and knowing that you have taken a programming class wants you to create an application for her. Her company is called Cathy's Candles. Cathy's Candles offers candles in three styles - tea lights, votives and pillars. The colors available are Federal Blue, Sunflower Yellow, Christmas Red and Milky White. The scented candles have an additional charge.We will make some assumptions - the credit card information of the customer is already in file, so only the name of the customer and their customer id will be obtained for this application. Only known customers are placing orders. At this point, Cathy's Candles cannot handle new customers since it is a small scale operation. Each order is processed only for one style, color, scented / unscented candles at this time. If the customer wants to place another order, a new run is needed.
Style Base Price Scented Price(Additional)
Tea Lights 5.75 1.00
Votives 8.75 2.00
Pillar 12.75 5.00
1. Subtotal should be calculated first using a value returning function calcSubtotal. The price and quantity
are the formal parameters.
Shipping fee is calculated using a value returning function called calcShipping. The formal parameter is
subtotal. The shipping fee is 3% of the subtotal.
The tax is calculated using a value returning function called calcTax. The formal parameter is subtotal.
The tax is 8% of the subtotal.
The total due is a value returning function called calcTotal. The formal parameters are subtotal,
shipping fee and tax.
The summary should print scented or unscented candles, the style of candle, the color, the subtotal first, followed by the shipping fee, and sales tax and finally the total due. Print a message to show that the customers will be charged the amount using the credit card in file.
Explanation / Answer
#include"stdio.h" #include"conio.h" #include"fstream.h" #include"stdlib.h" #include"dos.h" #include"string.h" #include"graphics.h" #include"iomanip.h" //******************************************************* // CLASS NAME : BOOK //******************************************************* class candle { public: char name[20]; char author[20]; int a; void getdata(); void show(); }; //******************************************************* // FUNCTIONS TO GET AND SHOW DATA //******************************************************* void candle::getdata() { cout< author; fflush(stdin); cout< >a; } void candle::show() { cout<Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.