Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes grade, Midterm grade, Practical exam grade, and final exam grade) (each column is separated by S). You are required to write a C program to do the following: • Using the concept of parallel arrays create records for students with above attributes (id, full name, score).(you are not allowed to use structure) • Ask the user to enter the input file name and read it (suppose that, there are different files you could read data from). Read the data from the file and store it in record for students, which has IDs, Names, and Scores. The IDs should be declared as integers, the Names as a two-dimensional array of characters and the Scores as doubles. Assume that the maximum length of full name of any student is 50 characters. Also, you may assume that there will be No more than a 1000 student records in the file. • Calculate the final grade as the flowing: Grade= (Assignment)*15%+(Quizzes)° *15%+(Midterm exam) *25%+(Practical Exam) *10%+(Final) *35% Assuming that data in files are arranged in same order of the above equation with respect to grades Hint: read form file, calculate the final score, and store it in the record before going to the next step.

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

Please answer in C Language and do not use the same solution from the old question.

Assume that a file contains students ' ids, full names, and their scores (Assignments grade, quizzes grade,
Midterm grade, Practical exam grade, and final exam grade) (each column is separated by $). You are
required to write a C program to do the following:
• Using the concept of parallel arrays create records for students with above attributes (id, full name,
score).(you are not allowed to use structure)
• Ask the user to enter the input file name and read it (suppose that, there are different files you
could read data from). Read the data from the file and store it in record for students, which has
IDs, Names, and Scores. The IDs should be declared as integers, the Names as a two-dimensional
array of characters and the Scores as doubles. Assume that the maximum length of full name of
any student is 50 characters. Also, you may assume that there will be No more than a 1000 student
records in the file.
Calculate the final grade as the flowing:
Grade= (Assignment)*15%+(Quizzes) *15%+(Midterm exam) *25%+(Practical Exam)
*10%+(Final) *35% Assuming that data in files are arranged in same order of the above equation with
respect to grades
Hint: read form file, caleulate the final score, and store it in the record before going to the next step.
• Display the following menu to the user and read the entered choice:
1) Sort data in ascending order according to students' IDs and then display it.
2) Sort data in ascending order according to students' names and then display it.
3) Sort data in descending order according to students" scores and then display it.
Note: After running any of the above menus items, ask the user if he/she would like to save the current result, if so,
prompt user to enter file name.
4) Ask the user to enter a student ID and display his score
5) Ask the user to enter a student name and display his score
6) Exit the program
The program should keep displaying the menu until the user selects to exit from the program.
Implement each of the first five menu options as a separate function.
The attached file "data.txt" is for test.
Transcribed Image Text:Assume that a file contains students ' ids, full names, and their scores (Assignments grade, quizzes grade, Midterm grade, Practical exam grade, and final exam grade) (each column is separated by $). You are required to write a C program to do the following: • Using the concept of parallel arrays create records for students with above attributes (id, full name, score).(you are not allowed to use structure) • Ask the user to enter the input file name and read it (suppose that, there are different files you could read data from). Read the data from the file and store it in record for students, which has IDs, Names, and Scores. The IDs should be declared as integers, the Names as a two-dimensional array of characters and the Scores as doubles. Assume that the maximum length of full name of any student is 50 characters. Also, you may assume that there will be No more than a 1000 student records in the file. Calculate the final grade as the flowing: Grade= (Assignment)*15%+(Quizzes) *15%+(Midterm exam) *25%+(Practical Exam) *10%+(Final) *35% Assuming that data in files are arranged in same order of the above equation with respect to grades Hint: read form file, caleulate the final score, and store it in the record before going to the next step. • Display the following menu to the user and read the entered choice: 1) Sort data in ascending order according to students' IDs and then display it. 2) Sort data in ascending order according to students' names and then display it. 3) Sort data in descending order according to students" scores and then display it. Note: After running any of the above menus items, ask the user if he/she would like to save the current result, if so, prompt user to enter file name. 4) Ask the user to enter a student ID and display his score 5) Ask the user to enter a student name and display his score 6) Exit the program The program should keep displaying the menu until the user selects to exit from the program. Implement each of the first five menu options as a separate function. The attached file "data.txt" is for test.
Expert Solution
steps

Step by step

Solved in 2 steps

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