CS 2308 Exam II Review
Exam Format 100 Total Points 50 Points Writing Programs 20 Points Tracing Algorithms and determining results 30 Points Short Answer Similar to quizzes and programming assignments
Example Programming Problem Given the TsuPod.h file at the end of the exam using the Linked List data representation write the method getRemainingMemory().
Example Tracing Problem Draw and label the following struct Node { int data; Node *next; }; Node *head = NULL; Node *ptr = new Node; Node *temp; ptr->data = 42; temp = head; ptr->next = head; temp = ptr;
Example Short Answer Can we have more than one constructor for a class? If so, how would we know which one to use?
Linux 15 Points Know the basic commands you needed to complete the last program Know how to compile and run a C++ program in Linux Know how to create and move around the Linux file system
Structures 10 Points Declaration Use of the “.” operator Arrays of structures tsuPod 2 Pointers to structures (*ptr).field ptr->field
Classes and Objects 40 Points Fundamentals of class and objects Declaration Constructors Destructors Instance variables Instance methods The “.” operator Objects as parameters to functions
Classes and Objects (cont.) Overloading functions Constructors Operators Relational Other Using objects as data inside of linked lists
Linked Lists 25 Points Declaring a linked list Adding a node to a linked list Removing a node from a linked list Traversing a linked list What is the order of magnitude of each of the above operations? Understand the tsuPod 3 linked list program
How to Study Rewrite all the programs. Redo labs. Learn by doing and recognizing patterns. Don’t stay up late!! Get some sleep and eat a good breakfast.
What to bring Pencils and erasers We will provide scratch paper No calculators
Questions