Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fill in the blanks to make the code work. with C-++ #include #include #includecustomer.h using namespace std; //The header file of the class CUSTOMER used
Fill in the "blanks" to make the code work. with C-++ #include#include #include"customer.h" using namespace std; //The header file of the class CUSTOMER used is included void main() { ___BLANK___Credit; printf("Customer Name Payment Due "); printf(" "); Credit=100.0; for (int i=1; i<=3; i++) { CUSTOMER Customer; ___BLANK___.ConstCustomer(i); printf ("%s", Customer.ReturnCustomerName()); printf("%4.2f ", Customer.CustomerDue(Credit)); ___BLANK___ } //**** Class CUSTOMER definition **** //File is "customer.h" class CUSTOMER //Class declaration { private: //Attributes int CustomerNumber; ___BLANK___ CustomerName[20]; ___BLANK___ CustomerBalance; char CustomerPhone[15]; public: CUSTOMER () { //Constructor is actually implemented by the method //void ConstCustomer(int) }; //Operations //The following procedure simulates the system to read a //database/data file which records information of customer void ConstCustomer(int CN) { CustomerNumber=CN; if (CustomerNumber==1) { strcpy_s(CustomerName, "John "); CustomerBalance=-200.05; strcpy_s(CustomerPhone, "123 1234"); } if (CustomerNumber==2) { strcpy_s(CustomerName, "Anne "); CustomerBalance=-200; strcpy_s(CustomerPhone, "123 2345"); } if (CustomerNumber==3) { strcpy_s(CustomerName, "Greg "); CustomerBalance=100.78; strcpy_s(CustomerPhone, "123 7890"); } } //Next are methods of the CUSTOMER class ... ___BLANK___ ___BLANK___ {return CustomerName;}; ___BLANK___ *ReturnCustomerPhone() {return CustomerPhone;}; double ReturnCustomerBalance() {return CustomerBalance;}; double CustomerDue(double CR) { ___BLANK___ ___BLANK___ ___BLANK___ if ((CustomerBalance+CR)<0) { DueAmount=(CustomerBalance+CR)*-1; } else { DueAmount=0; }; ___BLANK___ (DueAmount); } ___BLANK___
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started