Question: C++ class: The program below computes the subtotal, discount, and the total cost for new computers for the ATC building. Write the prototype, call statement

C++ class: The program below computes the subtotal, discount, and the total cost for new computers for the ATC building.

Write the prototype, call statement and function definition for getData() which is to prompt the user for and input the number of computers and the price each.

Write the prototype, call statement and function definition for calc() which is to calculate the subtotal, amount of discount, and the total for this purchase. The discount rate is 5% for orders under $5,000 and 12% for orders of $5,000 or more.

Make no changes to main(). No comments are necessary.

#include #include

using namespace std;

//Function Prototypes

_____________________________________________

________________________________________________

int main() { //Variable declaration int num; //number of computers to be ordered double price; //cost each double subtotal; //cost each multiplied by number double discount; //% of subtotal double total; //subtotal - discount

//Call getData to input price each and number in order

________________________________________________

//Call calc() to compute subtotal, amount of discount & tota

________________________________________________

cout <<" SUBTOTAL: $ " << subtotal; cout <<" DISCOUNT: $ << discount; cout <<" TOTAL: $ << total;

return 0; }

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!