Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming c++ Print Payment Bill for DoCoMo Telecom - An owner of a Telecommunication company DoCoMo with 10 customers has updated the information of his

programming c++
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Print Payment Bill for DoCoMo Telecom - An owner of a Telecommunication company DoCoMo with 10 customers has updated the information of his customers according to the following table. Name Subscription Rate/Hour Hours Akira Full-Package 0.55 110 Kenji Full-Package 0.55 80 Shun Half-Package 0.35 15 Megumi Half-Package 0.35 36 Jun Basic-Package 0.25 100 Atara Half-Package 0.35 55 Yuka Basic-Package 0.25 70 Takashi Half-Package 0.35 85 Seiko Basic-Package 0.25 10 Takumi Full-Package 0.55 65 You are asked to design a C++ program that assists the owner of the DoCoMo company. The program should accept the customers' details from a text file (customer_data.txt) according to the above table by calling a function named read_data(). Then, the program should calculate the payment amount by calling a function named calcPay( 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 customer's details. Following are the descriptions of the program: a) The program uses a struct to store all customer's details including name, description, rate/hour, hours, and payment for each customer. b) The program uses a 1-dimensional array to store the customer details using pointer notations. C) 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. d) The calcPay() 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. e) The function print_data()should be defined as a void function that displays a report of the customer's details including the payment in front of each customer's 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 Akira Full-Package 0.55 110 Kenji Full-Package 0.55 80 Shun Half-Package 0.35 15 Megumi Half-Package 0.35 36 Jun Basic-Package 0.25 100 Atara Half-Package 0.35 55 Yuka Basic-Package 0.25 70 Takashi Half-Package 0.35 85 Seiko Basic-Package 0.25 10 Takumi Full-Package 0.55 65 Sample of Output The customers' data being read. The customers' data have been read succefully. Below is the customer's details report including the payment.... Name Description Rate/Hour Hours Payment 60.5 44 Akira Kenji Shun Megumi Jun Atara Yuka Takashi Seiko Takumi Full-Package 0.55 Full-Package 0.55 Half-Package 0.35 Half-Package 0.35 Basic-Package 0.25 Half-Package 0.35 Basic-Package 0.25 Half-Package 0.35 Basic-Package 0.25 Full-Package 0.55 110 80 15 36 100 55 70 85 10 65 5.25 12.6 25 19.25 17.5 29.75 2.5 35.75

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

8-15 Discuss the impact of the Equifax hack.

Answered: 1 week ago