0% found this document useful (0 votes)
35 views1 page

Candidate Selection Process App

The document describes an application called SelectionProcess that manages candidate selection using text files. It allows the user to choose between using an existing "Candidates" file or creating a new one. It then prompts the user for the number of candidates and each candidate's name, last name, and two partial notes. These records are written to the Candidates file. The application then opens this file, creates a "Selected" file, and copies over candidates whose average notes are above 60, writing their names and averages to the new file. Finally, it displays the number of candidates selected.

Uploaded by

javier
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Candidate Selection Process App

The document describes an application called SelectionProcess that manages candidate selection using text files. It allows the user to choose between using an existing "Candidates" file or creating a new one. It then prompts the user for the number of candidates and each candidate's name, last name, and two partial notes. These records are written to the Candidates file. The application then opens this file, creates a "Selected" file, and copies over candidates whose average notes are above 60, writing their names and averages to the new file. Finally, it displays the number of candidates selected.

Uploaded by

javier
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like