Question
An owner of a Telekom company with 10 customers has updated the information of his customers according to the following table. Name Subscription Rate/Hour Hours
An owner of a Telekom company with 10 customers has updated the information of his customers according to the following table. Name
Subscription
Rate/Hour
Hours
Ali
Full-Package
0.55
120
Zakariah
Full-Package
0.55
80
Norasikin
Half-Package
0.35
15
Muhammad
Half-Package
0.35
35
Atiqah
Basic-Package
0.25
100
Maisarah
Half-Package
0.35
55
Sakeena
Basic-Package
0.25
70
Zulkifli
Half-Package
0.35
85
Safiudeen
Basic-Package
0.25
10
Ammar
Full-Package
0.55
65
You are asked to design a C++ program that assist the owner of the Telekom company. The program should accepts the customers details from a text file (customer_data.txt) according to above table by calling a function named read_data(). Then, the program should calculate the payment amount by calling a function named calcNet()to calculate the total payment for each customer. Lastly, the program should call another function called print_data () to display a report of the above data as well as the payments in front of each customers details.
Following are the descriptions of the program:
The program uses a struct to store all customers details including name, description, rate/hour, hours, and payment for each customer. The program uses a 1-dimensional array to store the customer details using pointer notations. The read_data () should be declared as a void function reading the customer details from the text file called (customer_data.txt) for the 10 customers. The function takes three (3) arguments. The function shall be called by the main() function. The calcNet() should also be defined as a void function calculating the payment amount of the bill for each customer based on the rate/hour and the hours values. The function takes two (2) arguments using pointer notations. The function shall be called by the main() function. The function print_data()should be defined as a void function displays a report of the customers details including the payment in front of each customers details. This function should be called by the main() function.
Sample of Input. Note that these details stored in a text file called customer_data.txt
Ali Full-Package 0.55 120 Zakariah Full-Package 0.55 80 Norasikin Half-Package 0.35 15 Muhammad Half-Package 0.35 35 Atiqah Basic-Package 0.25 100 Maisarah Half-Package 0.35 55 Sakeena Basic-Package 0.25 70 Zulkifli Half-Package 0.35 85 Safiudeen Basic-Package 0.25 10 Ammar Full-Package 0.55 65
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