Name _________________________

CSC001- Major Assignment 6
Arrays (Programming)

ublkline620.GIF (83 bytes)

D. Joseph
Fall 1998

Due: Wednesday, December 2
Total Points: 40


This is NOT a group assignment!


I. Problem Statement

You are a TA for an introductory computer science class. Professor A. Ray whom you work for expects your section's grades to be turned in as quickly as possible. Your class has taken two exams: a midterm and a final. Knowing that you are one of the finest TAs, Professor Ray asks you to heop the other TAs out by writing a program that they can use. The professor wants to see a nicely formatted report that includes the students name, midterm score, final score, grand total, percentage, and letter grade.

Additionally, Professor Ray would liek to see the low and high scores along with the class average. The midterm exam was worth 150 points and the final exam was worth 250 points for a grand total of 400 points.

Your QBASIC program must print the possible grades and a complete list of all the student's names with their corresponding midterm score, final exam score, total combined score, percentage of total score, and the student's semester grade. Finally, your program will print out the high and low score, along with the class average. The format for your output should be similar to the following example:

 

Introduction to Computer Science
Student Results

    

Student Name	Midterm	  Final	  Total	  Percent	Grade

-------------------------------------------------------------

POSSIBLE:	150	  250	  400	  100.00%	A

-------------------------------------------------------------

    
Franklin	149	  200	  349	  87.25%	B

Jefferson 	100	  237	  337	  84.25%	B

Kennedy		89	  113	  202	  50.50%	F

Bush		130	  242	  372	  93.00%	A

Lincoln		127	  173	  300	  75.00%	C

-------------------------------------------------------------

High Score: 372
Low Score: 202
Class Average: 312

    

You do not need to follow this format exactly, but you must include all the information in a neat readable form. You must include REM statements that give your name, section, date, and purpose of the program. REM statements throughout the program would also be very helpful.

Use the following percentages to determine grades in your class:

>=90 and <= 100 = A
>=80 and < 90 = B
>=70 and < 80 = C
>=60 and < 70 = D
>=0 and < 60 = F

II. Required Data

The data will consist of a list of names of students and corresponding midterm and final scores. The number of students in the other T.A.'s sections is unknown, but will never exceed 100. (It is assumed you will use arrays to store the data.)

Store the following data in an MS-DOS Edit file and use it to test your program. (If you need help on this, refer to Chapter 10 of your lab book.)

OWEN, 150, 250
SMITH, 100, 200
BROWN, 98, 179
WEAVER, 112, 236
HANSFORD, 137, 241
SANDERS, 129, 199
BOAZ, 132, 137
MULDER, 145, 239
SIMPSON, 83, 146
TAYLOR, 109, 197

 

III. Required Elements

You must include the following to get full credit:

  1. A hardcopy of your program listing.

  2. A hardcopy of your output using input from the data file.

  3. The program should inculde a plenty of remark statements that explain what the program attempts to accomplish as well as what is happening at various stages in the program.

  4. The program should also contain meaningful variable names.

IV. Extra Credit

Professor Ray has offered to buy pizza for you and the rest of the T.A.s if you do a good job!

If your program will also sort the list according to the student's name then you will get 5 points extra credit!!

V. Helpful Hints

1. Use Heading$ and DataLine$ strings to construct a format for your table. (See Lab book, pp.135)


2. If you do the extra credit, sort your data after you have calculated all of the necessary variables and when you sort the student's names, don't forget to sort their corresponding data for midterm, final, total, percent, and grade as well.


Good Luck!

 

ublkline620.GIF (83 bytes)

Return to:  CSUS | Computer Science

November 17, 1998
Comments to:  josephd@csus.edu