SemesterGPA - Algorithm to calculate the semester GPA Sample done in Ms Eddy's class on Tuesday Nov 6 Simplified from class example since all classes

SemesterGPA - Algorithm to calculate the semester GPA...

This preview shows page 1 - 2 out of 2 pages.

Algorithm to calculate the semester GPA: Sample done in Ms. Eddy's class on Tuesday, Nov. 6. Simplified from class example: since all classes are 3 credit hours, assumes grade points range from 0.0-4.0 (rather than 0.0-12.0). 1. Write the description Algorithm SemesterGPA . Given three classes ( class1, class2, class3 ) and the grade points ( points1, point2, points3 ) for each in the current semester, calculate the semester GPA ( gpa ). The class variables are Strings and the grade points are real numbers. We assume all classes have the same credit hours. 2. Write the high-level steps (these the descriptions that go into the [ ] brackets in the algorithm) a. [ Input class names and points] b. [Calculate the GPA for this semester] c. [Print the GPA and any other thing you wish to print] 3. Fill in the details for each step (using ALCSE language) 1. [Get the class names and points] Read ( class1, points1, class2, points2, class3, points3 ) 2. [Calculate the GPA for this semester] gpa = (points1 + points2 + points3) / 3 3. [Print the GPA and any other thing you wish to print ] Write ( “My semester GPA is:“ ) Write ( “First class is “, class1, “ points = “, points1 )
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Spring '11
  • semester gpa

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes