OOP – Files problem - 1
Write an application called SelectionProcess to do the following:
Using text files.
I. Ask the user if you want to use the existing ‘Candidates’ file or if you want
to create it.
If the user chooses to use the existing file run from step f).
Otherwise run from step a).
a) Create a file named Candidates
b) Ask how many candidates are, to register in the file.
c) Ask for screen fields of each of the records to the file, ask fields are:
- Name
- Last name
- Partial note 1
- Partial note 2
d) Write each record in the file.
e) Close the file.
f) Open Candidates file, for reading.
g) Create a file called ‘Selected’.
h) Read each and every one of the records of Candidates file.
i) Process data from each record and write in the Selected file: the name,
the last name, and the average of those candidates which its notes
average is above 60 points.
j) Show by screen the number of candidates selected.