Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given a list of students with their ID , name, and score in student.csv file. Your task is to get the student

You are given a list of students with their ID, name, and score in "student.csv" file. Your task is to get the student data from the file. Next, sort the students by their scores in ascending order and display the sorted list. In cases of identical scores, sort students alphabetically by their names.
Data Representation:
Construct a structure named Struct_Student_Info, encompassing the following members:
StudentName
ID
Score
Functionalities:
a. SortByScore Function:
Input: The structure array ('studentsArray') and the number of students ('n').
Functionality: Sorts the students based on their scores. For students with the same score, an alphabetical order based on names should be considered.
Output: A modified structure array with students sorted as per the criteria.
b. Display Function:
Input: The sorted structure array.
Functionality: Outputs the sorted list of students.
Output: Display student names, IDs, and scores.
Sample content of student.csv file:
Name, Student id, Score
John Doe, 123456,60.00
Bruce Wayne, 100000,79.30
Bon Jovi, 345621,60.00
Ada Lovelace, 121915,100.00
Charles Babbage, 121791,99.90
Constraints -==-==-==- Student Name o can consists of uppercase and lowercase letters. o contains space character to separate first name and last name. o the number of characters will not exceed 50. Output Format - Print exactly n lines. Each line should display the students name, ID and score separated by space character. - the score should have exactly 2 digits after decimal point.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions