Question: Hello, I REALLY need help with this program please and it is due tomorrow morning. I have had bad experiences with functions anyway. This is
Hello, I REALLY need help with this program please and it is due tomorrow morning. I have had bad experiences with functions anyway.
This is C++
I hope someone will spend some time and help me. Here is all what you need to know.
Requirements:
The first function asks the user for the data below and stores the input values in reference parameters.
Input data from user:
# of spools ordered,
# of spools in stock,
any special shipping & handling charges above $10 rate.
The second function receives as arguments any values needed to compute and display the following information:
# of spools ready to ship from current stock,
# of ordered spools on backorder (if ordered > in stock),
Total sales price of portion ready to ship (# of spools ready to ship X $100),
Total shipping and handling charges on the portion ready to ship,
Total of the order ready to ship.
Exception Handlings
Input validation: Do not accept numbers < 1 for spools ordered,
Do not accept numbers < 0 for spools in stock or for shipping & handling charges.
AND HERE IS THE SAMPLE OF HOW IT SHOULD LOOK WHEN YOU RUN IT.
/* SAMPLE RUN RESULTS How many spools were ordered? 5 How many spools are in stock? 3 Amount of any special shipping charges (per spool) above the regular $10.00 per spool rate (0 for none): 0 *** Order Summary *** Spools ordered : 5 Spools in this shipment: 3 Spools back ordered: 2 Charges for this shipment ------------------------- Spool charges: $ 300.00 Shipping charges: $ 30.00 Total this shipment: $ 330.00 */
AND THESE ARE SOME HINTS/TIPS OF HOW TO DO IT
Lab HInts
const double UNIT_SPOOL_COST = 100.00,
SHIPPING_CHARGE = 10.00;
Two function prototypes:,e.g.
// Function prototypes void getOrderInfo (int &, int &, double &); void displayStatus(int, int, double = SHIPPING_CHARGE);
/************************************************************* * getOrderInfo * * This function is called by main to input and validate * * the number of spools ordered, the number in stock, and * * any special shipping charges. These values are stored in * * reference parameters. * *************************************************************/ void getOrderInfo(int &order, int &inStock, double &specChg)
{
}
/*************************************************************** * processDisplayStatus * * This function is called by main and passed as arguments the * * number of spools ordered, the number in stock, and the * * shipping charge per spool. The default value for shipping * * charge is $10.00. This information is used to display an * * order status report. * ***************************************************************/
void processDisplayStatus(int numOrdered, int inStock, double ShipChg)
AND these are bonus points if you can do them as well.
Lab Bonus
1 Bonus pt - able to simulate sale of a second stool price at $200 each.
- shipping charge free
1 Bonus pt - able to simulate back order case - just ship the in stock items.
Thanks in advance and let me know if you have any questions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
