A telco company needs a program that able to identify if the customer is eligible to get a rebate in the next bill cycle. Write a complete C program based on the below requirements: identify if the customer is eligible for a rebate based on the following condition. o If the day of payment for February bill is before 15 of the month, then the customer is entitled with a rebate in the next bill cycle. o Then, display the customer name, customer account no., and subscribed plan to a) Create a structure called Account, and below are the structure members: the output screen. o Customer Name o Subscribed Plan o Day of payment o Account No. o Bill No. o Payment amount payment (float) name (string) : plan (string) : day (nteger) acctNo (integer) billNo (integer) o Record the data into rebate_acct.txt. unifi_billFeb.txt (After Execution) Janet 1023928182 12 0032919992 800-Mbps 369.94 Remy 1023929817 3 0032917645 500-Mbps 263.94 Belle 1023928891 25 0032914321 500-Mops 263.94 Hairi 1023929817 20 0032917645 100-Mbps 200.34 Then, at the structure, create a structure variable called user. Hana 1029384756 8 32982738 100-Mbps 200.34 b) In the main function, declare 2 pointer variables called fread and fwrite of file type. o Use fread pointer to read and append a file called unifi_billFeb.Ext. o Use furite pointer to write to a file called rebate_acct.txt. New Record Danny 1029389039 19 32918279 800-Mops 369.94 rebate_acct.txt (After Execution) Janet 1023928182 800-Mbps Remy 1023929817 500-Mbps o Below is the content of unifi_billFeb.txt before program execution. unifi billFeb.txt (Before Execution) Janet 1023928182 12 0032919992 800-Mbps 369.94 Remy 1023929817 3 0032917645 500-Mbps 263.94 Belle 1023928891 25 0032914321 500-Mops 263.94 Hairi 1023929817 20 0032917645 100-Mbps 200.34 Hana 1029384756 100-Mbps f) Close all files after program execution has completed. g) Refer to the sample output. c) Read each record in umifi billFeb.txt, store it into the structure and display it to the output screen. (Refer to the sample output) o If the file does not exist, display an error message and terminate the program. SAMPLE OUTPUT: 02/2021 UIFI BILL PAENT CUST NAME ACCT NO PAT CAT BILL NO PLAN PATMENT 10239212 1023927 32919992 3291745 32914321 32917645 Janet d) Ask the user if they wish to add record to the file. As long as user enter 'Y", then get Beny Belle 500-1 500-pe 100-pe 19.94 C43.54 the following information from the user: o Get the customer's name, account no, day of payment, bill no. and subscribed plan and store it into the structure. C3.4 Hairi 102392417 C00.34 Ads recordtY Nane I Rana 4756 o Based on the subscribed plan, identify the price of the plan. Refer to the table below: Acet No. Dey of Payment 3292738 100-os Plan Subscription Plan 100-Мbps 500-Mbps 800-Mbps Price 200.34 263.94 Add recerd again? Y Nane Acet so. Day of ayent Bil No. Plan I banay 1029eso39 369.94 329 800-Mpa o Update the file with the new record. Ads recoed again? ... ... ........ ACCT TO GET EBATE ON EXT BILL CYCLE ....
A telco company needs a program that able to identify if the customer is eligible to get a rebate in the next bill cycle. Write a complete C program based on the below requirements: identify if the customer is eligible for a rebate based on the following condition. o If the day of payment for February bill is before 15 of the month, then the customer is entitled with a rebate in the next bill cycle. o Then, display the customer name, customer account no., and subscribed plan to a) Create a structure called Account, and below are the structure members: the output screen. o Customer Name o Subscribed Plan o Day of payment o Account No. o Bill No. o Payment amount payment (float) name (string) : plan (string) : day (nteger) acctNo (integer) billNo (integer) o Record the data into rebate_acct.txt. unifi_billFeb.txt (After Execution) Janet 1023928182 12 0032919992 800-Mbps 369.94 Remy 1023929817 3 0032917645 500-Mbps 263.94 Belle 1023928891 25 0032914321 500-Mops 263.94 Hairi 1023929817 20 0032917645 100-Mbps 200.34 Then, at the structure, create a structure variable called user. Hana 1029384756 8 32982738 100-Mbps 200.34 b) In the main function, declare 2 pointer variables called fread and fwrite of file type. o Use fread pointer to read and append a file called unifi_billFeb.Ext. o Use furite pointer to write to a file called rebate_acct.txt. New Record Danny 1029389039 19 32918279 800-Mops 369.94 rebate_acct.txt (After Execution) Janet 1023928182 800-Mbps Remy 1023929817 500-Mbps o Below is the content of unifi_billFeb.txt before program execution. unifi billFeb.txt (Before Execution) Janet 1023928182 12 0032919992 800-Mbps 369.94 Remy 1023929817 3 0032917645 500-Mbps 263.94 Belle 1023928891 25 0032914321 500-Mops 263.94 Hairi 1023929817 20 0032917645 100-Mbps 200.34 Hana 1029384756 100-Mbps f) Close all files after program execution has completed. g) Refer to the sample output. c) Read each record in umifi billFeb.txt, store it into the structure and display it to the output screen. (Refer to the sample output) o If the file does not exist, display an error message and terminate the program. SAMPLE OUTPUT: 02/2021 UIFI BILL PAENT CUST NAME ACCT NO PAT CAT BILL NO PLAN PATMENT 10239212 1023927 32919992 3291745 32914321 32917645 Janet d) Ask the user if they wish to add record to the file. As long as user enter 'Y", then get Beny Belle 500-1 500-pe 100-pe 19.94 C43.54 the following information from the user: o Get the customer's name, account no, day of payment, bill no. and subscribed plan and store it into the structure. C3.4 Hairi 102392417 C00.34 Ads recordtY Nane I Rana 4756 o Based on the subscribed plan, identify the price of the plan. Refer to the table below: Acet No. Dey of Payment 3292738 100-os Plan Subscription Plan 100-Мbps 500-Mbps 800-Mbps Price 200.34 263.94 Add recerd again? Y Nane Acet so. Day of ayent Bil No. Plan I banay 1029eso39 369.94 329 800-Mpa o Update the file with the new record. Ads recoed again? ... ... ........ ACCT TO GET EBATE ON EXT BILL CYCLE ....
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education