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...
icon
Related questions
Question
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
B
с
D
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()
(
}
return 0;
B 13
C 18
customer fatMan;
date Type bDate;
Input file call.txt:
12
D 33
A 17
A 24
C 28
B6
Price per unit
0.3
0.2
0.5
D 14
A 19
C2
B 37
C8
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
Transcribed Image Text: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 B с D 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() ( } return 0; B 13 C 18 customer fatMan; date Type bDate; Input file call.txt: 12 D 33 A 17 A 24 C 28 B6 Price per unit 0.3 0.2 0.5 D 14 A 19 C2 B 37 C8 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
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY