If I am reading ALI's post correctly,
Ali needs a weighted GPA according to the number of
hours per each course?
If so, this data model would be appropriate:
Course Catalog (describes the school standards):
Course Name (unique)
Hours
Student's grades (describes one student's grades for the courses he took)
Course Name (must match a Course Name from Course Catalog)
Letter Grade
Grade Points (describes how to turn a grade into point factor)
Letter Grade (unique)
point factor
So the algorithm to get a weighted GPA would be (correct me if I'm wrong)
Total_Hours = 0
Total_Points = 0
For each (course name, letter grade) in Student's Grades
Hours = lookup in pairs (Course Catalog, Course Name)
Points = lookup in pairs (Grade Points, letter grade)
Total_Hours = Total_Hours + Hours
Total_Points = Total_Points + (Hours * Points)
end For loop
Weighted_GPA = Total_Points / Total_Hours
ABG