Name _________________________

CSC001- Major Assignment 5
Loops (Programming)

ublkline620.GIF (83 bytes)

D. Joseph
Fall 1998

Due: Friday, November 20
Total Points: 30


This is NOT a group assignment!


I. Problem Statement

You are a TA for Professor Loop deLoop and he has asked you to write a program to input student test scores, calculate their averages and print out their semester grade.

You don't know how many students are in the class, but there are three test scores per student. Your program must work for any number of students. The input for each student will consist of the student's name and three test scores.

You are given the following information:

  • Each line of data will have a name and three test scores.

  • The last line will be used to mark the end of the data and it will contain:

endofdata -1, 1-, -1

  • Average = (test1 + test2 + test3) * 100 / 3

  • IF:
  • average >= 85 then Grade = A

    85 > average >= 70 then Grade = B

    70 > average >= 60 then Grade = C

    average < 60 then Grade = F

 

II. Required Data

Your data file should consists of the following:

Paula 45 80 95
Monica 60 50 70
Kathleen 40 73 45
Linda 40 30 35
Vernon 90 95 100
Hillary 96 98 100
Bruce 91 77 68
Ken 42 78 86
Betty 98 53 79
endofdata -1 -1 -1

Remember, each line of data consists of the student's name followed by three test scores. For information on how to create a data file, please refer to the process described in Lab Chapter 10. Your program will read input from this file.

 

II. The Output

Your output should look similar to the following...

Student Test 1 Test 2 Test 3 Average Grade
Paula 45 80 98 73.3 B
: : : : : :
: : : : : :

 

III. Required Elements

You must include the following to get full credit:

  1. You are required to turn in: a flowchart representing the algorithm, a listing of your source code (program), a hardcopy of your output using input from the data file.

  2. 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.

  3. The program should also contain meaningful variable names.

  4. You must submit a personal assessment paragraph that briefly describes your successes and frustrations in completing this assignment.


See this
assignment submited by a former student for an example of A+ work on a Major Assignment.

Good Luck!

 

ublkline620.GIF (83 bytes)

Return to:  CSUS | Computer Science

October 28, 1998
Comments to:  josephd@csus.edu