Suppose you have a text file named admission.txt that consists of applicants who have applied for admission in an IT institute. Data of file consist of multiple rows and each row represents one record separated by comma character in the following order.                                                                                                                                                                                                First Name Last Name CNIC Inter marks Percentage Age Phone Number Subjects in Inter (Major Subjects)

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 1CAT
icon
Related questions
Question

Suppose you have a text file named admission.txt that consists of applicants who have applied for admission in an IT institute. Data of file consist of multiple rows and each row represents one record separated by comma character in the following order.                                                                                                                                                                                               

  1. First Name
  2. Last Name
  3. CNIC
  4. Inter marks Percentage
  5. Age
  6. Phone Number
  7. Subjects in Inter (Major Subjects)

 

There are 200 available seats for current session and first come first served model will be followed. Admission Eligibility criteria is:

  1. Percentage must be greater than 60
  2. Age must be less than 30
  3. Candidate must have studied Math/Stat or Computer in Inter.

 

You are required to read and process the text file in a way that data of qualified candidates should be copied in a file qualified.txt. The data of new file must be comma separated and in the following format:

 

  1. Full Name
  2. Phone Number
  3. Eligibility (Yes or NO)
  4. Rejection Reason (Over Age, Low percentage, Missing Prerequisite, All seats reserved or NA)

 

Sample admission.txt file format

FirstName,LastName,CNIC,InterPercentage,Age,PhoneNo,Subjects

Ali,Khan,12345-1234561-7,55,25,370-884724,CS-Phy-Math

Ahmed,Ali,12345-1234561-9,70,20,371-818734,ENG-BIO-CHM

Ashraf,Khan,10345-1234211-8,65,22,388-828672,CS-Phy-Math

Sajid,Sheikh,23455-1234301-8,90,34,377-814794,CS-Stat-Math

 

Sample qualified.txt file format

Name,PhoneNo,IsEligible,Rejection Reason

Ali Khan,344-8184724,No,Low Percentage

Ahmed Ali,341-8184734,No,Missing Prerequisites

Ashraf Khan,344-8184724,Yes,NA

Sajid Sheikh,344-8184724,No,Over Age

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L