QA 5
Q1: Is delivery() only called if they have enough money to cover the tip?
Q2: Is change printed for credit payment?
Q3: Can checkdate() assume the month input will only be 11 or 12, or should
it verify a legal input date?
Q4: If the user does not have enough money for delivery, does it just print
the total with delivery?
Q5: Does my program need the same function declarations as PA#5 handout?
Q6: Does calc_price() have to be called with 1 argument?
-------------------------------------------------------------------------------
Q1: Is delivery() only called if they have enough money to cover the tip?
A1: Yes
-------------------------------------------------------------------------------
Q2: Is change printed for credit payment?
A2: No
-------------------------------------------------------------------------------
Q3: Can checkdate() assume the month input will only be 11 or 12, or should
it verify a legal input date?
A3: Essentially we are checking for the qualifying dates of used book prices
11/1-11/30, ELSE it will be new book prices.
Therefore
1) ONLY November 1-30 qualifies for the used book prices
2) ONLY 11/1-11/30 and 12/1-12/31 are legal input dates. Repeat loop until
a legal input value is entered.
3) December will NOT qualify for used book prices, and is given new book prices.
4) Do NOT check for other combinations of legal days of month limitations
e.g. leap year Feb 29th or April 31
-------------------------------------------------------------------------------
Q4: If the user does not have enough money for delivery, does it just print
the total with delivery?
A4: I actually ended up having another statement on the last line of page 9,
output "Total bill: $197.80"
-------------------------------------------------------------------------------
Q5: Does my program need the same function declarations as PA#5 handout?
A5: Yes. Data types MUST be same. Paramater names may be different.
e.g. PA#5 handout: void delivery( double &rtotal );
Your p5.C: void delivery( double &rTotalBookOrderBill );
-------------------------------------------------------------------------------
Q6: Does calc_price() have to be called with 1 argument?
A6: PA#5 does "NOT REQUIRE" the function call, calc_price(order); that has
a 2nd parameter a default initializer. How do you know it works?
Suggestion, put in an if statement calling it with 1 parameter as above
that takes the default initializer value of "used = 0". This means that
it will be for MOST buyers who get the NEW book price not the used book
deal when EXPLICITLY the 2nd parameter shows it is used book prices.
Passing 1 argument is faster/more efficient, than passing 2 arguments.
-------------------------------------------------------------------------------