Define the struct call with the components code (of type char) and units (of type int). Design a class bill with protected data members invoice (of type string), amount (of type double). numberOfCalls (of type int), date (of type dateType), and callList[ ] (an array of type call). The class has the member functions ser( ), print(), calculate Amount Duet ), and a parameterized constructor with default value 1 for the number of calls. The set function reads data from the file call.txt. The amount due is calculated based on the following table: code A } Design a class dateType with private data members day, month, year (of type int). The class has the member functions ser(), get(), print(), and a parameterized constructor with default value I for the day and the month and 2000 for the year. Design a class customer which publicly inherits the class bill. The class has the private data members name, phone Number (of type string). The class has the member functions set ), get(), print(), and a default parameterized constructor. Implement the member functions of all classes Use the following driver. int main() { customer fat Man date Type bDate: B C D return 0; B13 C 18 D 33 A 17 A 24 C 28 B6 D 14 A 19 C2 B 37 C8 Price per unit 0.3 Input file call.txt: 12 0.2 0.5 1.4 bDate set(23, 6, 2009); fatMan set("Ali Omar", "1234567", "Ets478", 23, 6, 2009); fatMan.print(); Sample output: The date dd/mm/yy is: 23/6/2009 The customer name is: Ali Omar The phone number is: 1234567 The invoice number is: Ets478 The date dd/mm/yy is: 23/6/2009 The amount due is: 123
Define the struct call with the components code (of type char) and units (of type int). Design a class bill with protected data members invoice (of type string), amount (of type double). numberOfCalls (of type int), date (of type dateType), and callList[ ] (an array of type call). The class has the member functions ser( ), print(), calculate Amount Duet ), and a parameterized constructor with default value 1 for the number of calls. The set function reads data from the file call.txt. The amount due is calculated based on the following table: code A } Design a class dateType with private data members day, month, year (of type int). The class has the member functions ser(), get(), print(), and a parameterized constructor with default value I for the day and the month and 2000 for the year. Design a class customer which publicly inherits the class bill. The class has the private data members name, phone Number (of type string). The class has the member functions set ), get(), print(), and a default parameterized constructor. Implement the member functions of all classes Use the following driver. int main() { customer fat Man date Type bDate: B C D return 0; B13 C 18 D 33 A 17 A 24 C 28 B6 D 14 A 19 C2 B 37 C8 Price per unit 0.3 Input file call.txt: 12 0.2 0.5 1.4 bDate set(23, 6, 2009); fatMan set("Ali Omar", "1234567", "Ets478", 23, 6, 2009); fatMan.print(); Sample output: The date dd/mm/yy is: 23/6/2009 The customer name is: Ali Omar The phone number is: 1234567 The invoice number is: Ets478 The date dd/mm/yy is: 23/6/2009 The amount due is: 123
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY