Question: Write the specifications for the function below The price of an item that you want to buy is given by two integers as priceDollars dollars

Write the specifications for the function below

Write the specifications for the function below The price of an item

The price of an item that you want to buy is given by two integers as priceDollars dollars and priceCents cents. You pay for it in cash by giving the clerk payDollars dollars and payCents cents. Write specifications (documentation) for a function that computes the change, if any, that you should receive. The correct change should be passed back in two function parameters as changeDollars and changeCents (that are passed by reference). Include a statement of purpose, the pre- and postconditions, and a description of the parameters, Be precise in the relationship between the inputs and outputs (don't just say, "the correct change is computed"). Do not write code to implement the function. Just write the specifications. Do not using floating point. Money is not subject to round-off error

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!