Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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