n this task you are required to writ generates the student university ID based on his registration information like his first name, last name, school and year of admission and code that sequence number. all this information are stored n the student file. The name of the student file should be entered by the user. The information in the student file are stored in he following order: First_name Last_name School Pear Seq The structure of the student ID is as follows: • The first three letters of the first name in upper case followed by • The school code appears as two digits.The code for each school is shown in the table below • The year which is the last two digits of the year field in the input file preceded by a 0. • The sequence number of the student as three digits. mportant Notes: • If the first name of the student is less than three letters or the first three letters have non alphabatical values then you should print "Invalid". • If the school name is not listed in the table then you should put "99" in the school code field. School Code Engineering 01 Sciences 02 Pharmacy 03 Medicine 04 Dentistry 05 1/0 Program Input: • the name of the file that has the student information Program Output: A single line that outputs the student ID

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Help me
In this task you are required to write a code that
generates the student university ID based on his
registration information like his first name, last
name, school and year of admission and
sequence number. all this information are stored
in the student file. The name of the student file
should be entered by the user.
The information in the student file are stored in
the following order: First_name Last_name School
Year Seq
The structure of the student ID is as follows:
• The first three letters of the first name in
upper case followed by
• The school code appears as two digits.The
code for each school is shown in the table
below
• The year which is the last two digits of the
year field in the input file preceded by a 0.
• The sequence number of the student as
three digits.
Important Notes:
• If the first name of the student is less than
three letters or the first three letters have
non alphabatical values then you should
print "Invalid".
• If the school name is not listed in the table
then you should put "99" in the school code
field.
School
Code
Engineering
01
Sciences
02
Pharmacy
03
Medicine
04
Dentistry
05
I/O
Program Input:
• the name of the file that has the
student information
Program Output:
A single line that outputs the student ID
Transcribed Image Text:In this task you are required to write a code that generates the student university ID based on his registration information like his first name, last name, school and year of admission and sequence number. all this information are stored in the student file. The name of the student file should be entered by the user. The information in the student file are stored in the following order: First_name Last_name School Year Seq The structure of the student ID is as follows: • The first three letters of the first name in upper case followed by • The school code appears as two digits.The code for each school is shown in the table below • The year which is the last two digits of the year field in the input file preceded by a 0. • The sequence number of the student as three digits. Important Notes: • If the first name of the student is less than three letters or the first three letters have non alphabatical values then you should print "Invalid". • If the school name is not listed in the table then you should put "99" in the school code field. School Code Engineering 01 Sciences 02 Pharmacy 03 Medicine 04 Dentistry 05 I/O Program Input: • the name of the file that has the student information Program Output: A single line that outputs the student ID
Sample Testcase 0:
Input:
File name, the file contains: Mohammad
Ahmad Pharmacy 2021 004
Output:
МОНоз021004
Sample Testcase 1:
Input:
File name, the file contains: An@s Ahmad
Engineering 1998 015
Output:
Invalid
Sample Testcase 2:
Input File name, the file contains: Anas
Ahmad Law 1998 015
Output: ANA99098015
1
#include <iostream>
2 #include <fstream>
4 using namespace std;
6.
int main()
7
{
char filename [20]; // Do
not change this line. It is
similar to string
8
9
cin>>filename;
10
ifstream in (filename);
11
12
//start your code here
13
14
15
16
//End
17
18
return 0;
19 }
Transcribed Image Text:Sample Testcase 0: Input: File name, the file contains: Mohammad Ahmad Pharmacy 2021 004 Output: МОНоз021004 Sample Testcase 1: Input: File name, the file contains: An@s Ahmad Engineering 1998 015 Output: Invalid Sample Testcase 2: Input File name, the file contains: Anas Ahmad Law 1998 015 Output: ANA99098015 1 #include <iostream> 2 #include <fstream> 4 using namespace std; 6. int main() 7 { char filename [20]; // Do not change this line. It is similar to string 8 9 cin>>filename; 10 ifstream in (filename); 11 12 //start your code here 13 14 15 16 //End 17 18 return 0; 19 }
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY