• Nie Znaleziono Wyników

Change the order of accounts written to the resultant files to be ordered ascending by the name of the employee.

N/A
N/A
Protected

Academic year: 2021

Share "Change the order of accounts written to the resultant files to be ordered ascending by the name of the employee."

Copied!
1
0
0

Pełen tekst

(1)

1. We run a small enterprise. Our employees have bank accounts at three online banks: iPKO, mBank and AliorBank with the unique bank identifiers 1020, 1140 and 2490 assigned, respectively.

The text file accounts.txt is given with a number of accounts unknown in advance. Each account is described in three lines containing in sequence: a bank account number of an employee in the IBAN format (described exactly below), the name of the employee and a salary, e.g.:

PL12 1140 6235 7851 3429 8357 9237 Smith

1234.56

The IBAN account numbers in Poland consist of the country prefix (PL) and then 26 digits, where the first two are the control sum digits (12 in the above example), next 4 digits identifies the bank (1140 in the above example), and the remaining ones form a unique account number in that bank.

The accountant expects lists containing account data separated for each bank and in the same order as in the original input file. Output files (if you have to create them) should be named 1020.txt, 1140.txt and 2490.txt, respectively. A single account must be written in three lines in form:

IBAN: PL12 1140 6235 7851 3429 8357 9237 Name: Smith

Salary: 1234.56

Tips: implement a structure modeling the input data for a single account and then use one of the abstract containers suitable for the task (from the standard library or implemented on your own).

2. Extend the program from task 1 to operate on any number of different banks (many bank identifiers). Change the order of accounts written to the resultant files to be ordered ascending by the name of the employee.

Cytaty

Powiązane dokumenty

Please write down the solutions (transformations, substitutions etc.), and additio- nally provide the final answer in the space specified (the answer should be a number in

Please write down the solutions (transformations, substitutions etc.), and additio- nally provide the final answer in the space specified (the answer should be a number in

Please write down the solutions (transformations, substitutions etc.), and additio- nally provide the final answer in the space specified (the answer should be a number in

The facility maintains strict sanitary rules: usage of hand disinfectant gel, limited contact with employees, maintaining an adequate 1.5 meter distance between those present in

The potential role of biofuels in commercial air transport–biojetfuel (Task 40 Sustainable International Bioenergy trade). Hydrotreating and hydrothermal treatment of

Stwierdzenie, iż taka kultura jest godna miana europejskiej, która oparta jest na chrześcijańskiej wizji człowieka i wynikających stąd wartości etycznych, nie

Lis-Wielgosz mainly focuses on show- ing the continuity of medieval literary forms (hagiographies, hymnographies) in the seven- teenth century. This fact is indicative of the

New technologies have changed the modern marketplace in all its aspects. However, these changes have not been continuous or uniform. Indeed some of the new market participants are