1. Engineering
  2. Computer Science
  3. problem 1 daa processing 50 the owners of a ccrner...

Question: problem 1 daa processing 50 the owners of a ccrner...

Question details

Problem 1: Daa Processing (50%) The owners of a ccrner store in a rural area allow their customers from the village to purchase on credit any tem in the store. When a purchase is done on credit t is recorded in a fie. The phone number of the family, the date or purchase and the amount due are recorded. Any member of a fam in ne vil ace can come a tine and make a a ment o ards mat due DI e en an advance The hane number o tre amily. e da e o lhe a ment and Te amoun: are eco dec n a se arate file he o ers noced at some c the customers o en s i ove them a large amo unt 812507,Robert Post,66 Hintan Road 7888070513 rarrukh ahred,101 Cdson Crest 83214357 Md Toukir I 34 Sherwood Park Arenue 7387098123 Elha Ahnad1,3 Devan Place 734987554, Rang Feg,3 ruce Street 73012357 Nazanin Tahrasb,99 Albert Avenuc 7804321338 ,Say㎝ Hohùffad,56 Stony Place 7800e01234 Alfred 83a1i, 3 Tijani treet he s and lle dues xt nlar s rl D 더lion a aut he purchases llal wes bauqtt an aed an Irie ontaris a date the annurt due and the none nur e10 lhe farm who did the uchase, a separated b The date ls cemalled YiMM he le loo s ke lft s 2818/1182:08.95:7808987554 2018/11/d5:22.sai/8เท23456} 2910/11/15;34.975788-192288 2010/11/15 05.157888076543 2010/11/15:58,20;7881234557 2013/11/18 2018 11/21,57.35,7304922350 2013/11/2 2018/11/27 2018/11/28:67.38:7301236739 2818/113:E5.95:7801236732 2818/11372.58781234587 6.75,78032145 2010/11/se 128,57880765432 2010/11/30;27,557884321093 The third ie payments.txt, contains Infommation about paryments. Its structure is similar to the second fle. Each ine contains a date, the amount pad, and the phone number of the famity who did tho payment, all soparatod by You are required to wnte a program that would generate a le, call tsummary.txt, that can ba printed and contains a table listing the customers that purchased credt and that mada payments with their total duas and the list of paryments thay dd. The tabie should be fomatted as follos and he ist of payments wlth the dates should be outside the tabie on the right.The third file payments.txt,contains information about payments Its structure is similar to the second file. Each ine contains a date the amcunt paid, and the phone number of the family aho did the payment, all separated by DU art ulled to wte i piorarm that would tjene ale a e cali summa the ist ot payments with the dares should the outside the table on the righ xt l al n e printed and untaris a la isin the Skimers lhal urchase cedit and lhal m ate lls w lh thei Ic al dues สา ne ísl o vmen s he did The tatile sI uld te armated as a kr sand Mn Your pragram should read the threc flcs and produce a tablc sarmatted as tallows Phone NurcerNane (7 123 4567 Robert Post (7ae) 123 6789Nznin Tahsssebi 22.25 S3.00] 281311 s3.0) (7a0) 321 4567 Nd Toukir Inan 84.75I (780) 432 1698 Sayon Hohausid2.25S15.50] 2818/33/25 (85.S): 2818/31/3 ($18.e): 591.22 (7) 030 705 Rong reng (7) 90 14 Alfred Dssl (7ae) 997 e543 Ferrukh Ahved 2.25 55. S 148.471$1.47 |$ 13e·33151 , 291 317,221$5.12 2813/11/38 (50)i Total DuesI $ 729.32 Total Interus 5.86 The table has 4 cclumns and is sorted by the phone number The first cclumn is the phone number. This number has to be fermatted as (999) 999 9999. Tha second column is the name and It has o be 18 characters ide. if the name is longer, the name is truncated to ft In adcition, the name is prefboed wth irthe amount due is higher than 5500 . The third column is the ฮ ou t duc. This mount goud tc prntod wth 7 posto ns and only 2 attertncdccr al port. Note that thc amount duc should bCincreascd by interest rrthc nt al amount 15 higher than S100. Moreover, akngside the table and on the same roa of the customer, we need to have the ist of payments with the dates they were made formated as per the example table. The ist is preceded by the tolal paid between square brackets. Alamounts should be fomatted with 2 numbens after the decimal point Finaly, two lines at the end of the table should Indicate the total amount due by the whole community and the total Interest Incumed by all the customers. The tabla should be formatted as illustrated above. Note that the example autput table is not exacity related to the two input cxamales provided here Indeed the cutput depends an 3 input hles. The input pravided here is Just an eampic. Yau shoud create your own asslanment with dfferent inpur files. tles and sick to the structure descrbed here The TAs wil evaluate your Also note tha the Total Interes is written wnout the t.Is Intentional. This is what the customer wants.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution