Question: Create an assembly language program that will read in a set of student records. Each student record will consist of a name, and an array

Create an assembly language program that will read in a set of student records. Each student record will consist of a name, and an array of grades. Your program will read in a name (Maximum length of 10 characters) and 6 grades (each a whole number from 0 to 100). The input will be on one line with the spaces used to separate the items on a line. The last grade will be followed by the enter key. Up to 20 records may be entered. The end of the data will be signaled by the word END in upper case. Your program will average the grades for each student and display the student name, average (as a floating point value/C++ double), and letter grade. The display is to be done in alphabetical order by name. The sort should be case insensitive, that is the fact a letter is upper or lower case will not matter in the comparison of names. The letter grade will be calculated as A (90 or higher), B (80 or greater but less than 90), C (70 or greater but less than 80), D (60 or higher but less than 70), or F (less than 60). #include

#include using namespace std;

extern "C" double Average (long [6]);

extern "C" char LetterGrade (double);

extern "C" void Sort (char [] [11], char [], double [], long);

void main () { double Averages [20];

long Grades [6]; char LetterGrades [20]; char Names [20] [11]; string End ("END"); long i; long NumStudents;

cout << "Please enter data as Name followed by six whole numbers" << endl;

cout << "End with an enter key as the only entry on a line" << endl;

for (NumStudents = 0; NumStudents < 20; NumStudents++) { cin >> Names [NumStudents];

if (End == Names [NumStudents]) break; else { for (i = 0; i < 6; i++) cin >> Grades [i];

cin.ignore (1, ' '); Averages [NumStudents] = Average (Grades);

LetterGrades [NumStudents] = LetterGrade (Averages [NumStudents]); } } Sort (Names, LetterGrades, Averages, NumStudents );

for (i = 0; i < NumStudents; i++) cout << "Student " << '[' << i << "]= " << Names [i] << ' ' << Averages [i] << ' ' << LetterGrades [i] << endl; } The C++ program will be in the Handouts folder in Canvas. Your assembly language file will be named Example.ASM. You will write the assembly language routines for Average, Sort, LetterGrade.

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!