Skip to content

Instantly share code, notes, and snippets.

@klaeufer
Created October 20, 2011 18:13
Show Gist options
  • Save klaeufer/1301849 to your computer and use it in GitHub Desktop.
Save klaeufer/1301849 to your computer and use it in GitHub Desktop.
Loyola University Chicago Comp 373/473 Project 2a Sample Test Case 2
struct StudentCourseRecord { firstExamScore, secondExamScore, totalScore };
struct StudentSemesterRecord { course1, course2 };
var q;
var r;
r = new StudentSemesterRecord;
r.course1 = new StudentCourseRecord;
r.course1.firstExamScore = 25;
r.course1.secondExamScore = 35;
r.course1.totalScore = r.course1.firstExamScore + r.course1.secondExamScore;
r.course2 = r.course1;
q = r.course2.totalScore;
r.course1.firstExamScore = 45;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment