内联汇编代写

Department of Computer Science and Software Engineering

Topic Practical Assignment 4
Assignment Type Assessed Non-assessed Individual Group
Module CSE101 Computer Systems
Due Date December 12th, 2018 (Wednesday)

1. Assignment

Write an assembly program that sorts and computes the grade statistics for between 3 to 10 students. Your program will prompt the user to enter Student IDs, Student Names, and their associated grades between 0 to 100. Print out a sorted list from highest to lowest grade, their mean and standard deviation. Also print a message indicating number of students who have failed if their grades are less than 40.

  1. Learning Outcome
    1. To understand the components of a computer system, their functions, and interactions.
    2. To develop further inline assembly programming skills.
  2. Requirements and Assessment Your program MUST be developed using Visual C++ inline assembly language.
    1. Your program can compile and run. (10 marks)
    2. Prompt the user to enter number of students between 3-10. If the user enters any number that is not in range, prompt the user again. (3 marks)
    3. Loop to request user to enter Student IDs, Student Names, and Grades. Each Student ID must be 5-digit in length, ranging from 18000 to 18999. Each Student Name has a maximum length of 10 characters. Meanwhile, each Grade must be a positive integer between 0 to 100. (15 marks)
    4. When looping to request the user to enter Student IDs, Student Names, and Grades, each entry request message must be post-fixed with proper numbering, e.g. Enter Student ID [1], Enter Student Name [1], Enter Grade [1], etc. (2 marks)
    5. If the user enters a Student ID, Student Name or a Grade that does not meet the requirements in step 3 above, prompt the user to re-enter. (5 marks)
    6. Once all the Student IDs, Student Names and Grades have been entered, display a numbered list, sorted from highest to lowest grades. (10 marks)
    7. Display the mean and standard deviation of the grades, and number of students who have failed if their grades are below 40 (not inclusive). (5 marks)
    8. Well-commented, stapled program listing for your solution. (50 marks)
  3. Sample Output

A sample output from the program is shown below.

Enter number of students (between 3-10): 22 // out of range
Page | 1

Department of Computer Science and Software Engineering

Enter number of students (between 3-10): 4
Enter Student ID [1]: 18678
Enter Student Name [1]: Kerry
Enter Grade [1]: 43

Enter Student ID [2]: 1801 // Student ID not meeting requirement Warning: Invalid Student ID. Must be between 18000 to 18999. Enter Student ID [2]: 18011
Enter Student Name [2]: Ali

Enter Grade [2]: 126 // Grade out of range Warning: Invalid Grade. Must be between 0 to 100. Enter Grade [2]: 26
Enter Student ID [3]: 18727

Enter Student Name [3]: Jun Li
Enter Grade [3]: 72
Enter Student ID [4]: 18555
Enter Student Name [4]: Guang Min Zhang
Warning: Invalid Student Name. Must be 10 characters or less. Enter Student Name [4]: Guang Min

Enter Grade [4]: 66

List of Student IDs, Student Names and their Grades:

1.18727 JunLi 72 2. 18555 Guang Min 66 3.18678 Kerry 43 4.18011 Ali 26

Mean is 51.75
Standard deviation is 21.2348
Number of students who failed is 1
Program ends.

Page | 2

Department of Computer Science and Software Engineering

5. What to do during the assessment upon the due date?

  1. Sign for attendance at the pre-scheduled assessment timeslot.
  2. Demonstrate and explain to the lab demonstrator that your program works for the problem assigned.
  3. Hand in a well-commented, stapled program listing with the module title and your name/student number shown on the title page. Your program listing should not exceed 8 pages.
  4. You must also sign and declare non-plagiarism.
  5. Submission after the due date will adhere to the University’s policy on late submission. ———- End of Document ———-

Page | 3