Question: write a program in c++ that: Your exercise is as follows: first create a structure called student that contains a string member called name that

write a program in c++ that:

Your exercise is as follows: first create a structure called student that contains a string member called name that will store the students name and a float member called grade that will store the students test result. Next use dynamic memory allocation to create an array of structures of sufficient size (you will need to use the number on the first line to determine the size) and read each name in ee208.txt into each structures string member. Generate a random test result between 0-100 for each student and store in each structures grade member. Finally, write a function called sort which takes in the array of students and sorts them in descenting order of grades. You should be able to use your swap functuion in a previous lab as a guide. Finally write each name and result in decenting order into results.txt. Good luck!

Below is the input file. This files contains a list of the names of all students in this class, where the first line contains the number of students in the class.

56 ROBYN CHRISTIEN SEERY RYTIS BEINARYS EOIN CORRIGAN JORDAN JAMES O'DONNELL MARK FRANCIS GAFFNEY JEEVAN PUNNACKAL JAMES AARON NUGENT MISBAH UL HASSAN KARA POWELL DONAL REILLY NATHAN PHIPPS O'NEILL KAREN CLAIRE HORAN SHAUN PAUL COSTELLO AHMED ISAMELDIN HASSAN MARK SWEENEY TOMAS JOSEPH SMYTH SINEAD MARY BROWNE SEAN PAUL GILL MOSHOOD AYOBAMI OMOYELE LUKE PETER BLANCHE MICHAEL JOHN O'RAFFERTY WILLIAM ANDREW MC DONNELL CARL HANY WAHEEB FALTAOUS DARRAGH GEORGE LYNCH MICHAEL REYNOLDS TIARNAN SEAN POWELL MATTHEW BRENDAN BYRNE BRYAN NAUGHTON KEVIN JAMES DALTON MARK BROWN EOIN FARRELLY EOIN MICHAEL DUIGNAN ADAM DUNNE SHANE KENNY ROSS AYLWARD OFURE DESTINY AGHABUEZE-AYO ROISIN MARY KEATING LUCAS JEANNIOT SANDRA-CARINA BERGMANN COLM DAVID MATTHEWS MOHAMMAD GHARNIQUE ABBAS BRIAN RORY GEORGE CRINION WILL DOUGLAS MELISSA MARY CLARKE KARL LUKE LUBY JIACHEN ZHENG JOHN GERARD CORCORAN DANIEL JOHN MC CORMACK KILLIAN O'CARROLL DILANE NKEMCHIA NZIKO ALAN MATTHEW SAMUEL PORTER DARRAGH PARAIC NOLAN CIARAN JOSEPH WINTERS CORNELIA MARION SCHMITT CIAN VAUGH AYODEJI MUHAMMED-SEFIU MOGAJI

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!