CS 211 - 10/14/16 Exam 1 in Lab on Wednesday. - you will have 1hr 50minutes to complete a program. The link in blackboard will dissapear at 10:55, 12:55, 2:55, 4:55 You will be asked to write a program in C (we will grade it using the gcc compiler), the program will somehow involve one of: - stack implemented with a dynamic array - stack implemented with a linked list - queue implemented with a dynamic array - queue implemented with a linked list During the exam, you can have access to any code, notes, books, internet that you desire. Most often, the values can be read in using a simple scanf() statement scanf ("%T", &valname); ============================ Project 4 - ============= Fraction f1, f2, f3; f3 = f1.add(f2) ---------------------- public Fraction add (Fraction fp2) // fp2 gets value from f2 at the call { // the this pointer is a reference to f1 at the call Fraction result = new Fraction ( tempNum, tempDen); result.reduce() return XXXXX; // stored into f3 at the call } ======================= class Fraction { private int num; private int den; public void method1 ( ) { // the following do the same thing // update the class data member num = 5; this.num = 5; reduce(); this.reduce(); } public void method2 ( float num ) { // the following are not the same in this case num = 5; // update the parameter this.num = 5 ; // update the class data member } }