For each of the following problems, use the top-down modular approach and pseudo code to design a suitable program to solve it.

1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records of the form: student (string), test1 (integer), test2 (integer), test3 (integer) in this file, all test scores should be set equal to 0.


Process
1 Display the Program Title - "Student Test Score Program"
2 Get Student Name
3 Display Grade File- “Test Scores”
4 Calculate Student Grade- “Test Scores”
5 Display Student Grade Total
Input

Student Name -real

Student Test Score - real

Output

Student Test Scores Results - real

Main Module
      Declare Student as String
      Declare Test1 as integer
      Declare Test2 as integer
      Declare Test3 as Integer

Write “Welcome to the Student Test Score program”

      Call Student Grade File 
      Call Calculate Student Grades
      Call Display Student Grades 

End program

End Main Module Program

Student Grade File- Test Scores
Open “Student Grade File” for output test scores
       Write “Enter student name “
       Input  “ZZZ  when you are done”
       Input Student, Test (1), Test (2), Test (3)

While Student <> “ZZZ”
Set Test = 0
      
End While

End Student Grade File- Test Score Program

Calculate Student Grade - Test Scores
Declare  test scores as Integer
Set Total = Test (1) + Test (2) + Test (3)

End program

End Calculate Student Grade - Test Scores Program

Display Student Grade Total 


End program

End Student Grade Program

Looks okay where are you struck ?

where are you struck?

I hope it didnt hurt much :) ...

This is what brought me to this website. It looks good to me. I used a variant of the same system

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.