140 total points ◦ 100 points writing programs ◦ 24 points tracing algorithms and determining...
TRANSCRIPT
140 Total Points◦ 100 Points Writing Programs◦ 24 Points Tracing Algorithms and determining
results◦ 16 Points Short Answer
Similar to quizzes and programming assignments
Given the stack.h ADT, write a function that converts a decimal number to a binary string.
What will the EXACT output of the following program be?
int foo = 9; int *ptr = &foo; float foo2 = 5.7; *ptr = 2; foo2 = foo - foo2; if (foo > foo2) cout << "Hello!"; else if (foo < foo2) cout << foo2; else cout << foo; cout << endl; cout << "foo2 is: " << fixed << setprecision(1) << foo2 << endl;
Can we have more than one constructor for a class? If so, how would we know which one to use?
50 points◦ One and two-dimensional arrays
Dynamic allocation◦ 2-D arrays
Game of Life program◦ Arrays of structures
The tsuPod 2 program◦ Relationship between arrays and pointers
20 Points◦ Know the fundamental operations and how a
stack works Push Pop Size
15 Points◦ Declaration◦ Use of the “.” operator◦ Arrays of structures
tsuPod 2◦ Pointers to structures
(*ptr).field ptr->field
20 Points◦ Getting command line parameters
Equation Checker◦ Header files◦ I/O libraries
printf and scanf◦ No const◦ No string data type
Know how to manipulate arrays of characters Know how C string functions work
◦ No pass by reference◦ No bool data type
24 Points◦ Fundamentals of class and objects
Declaration Constructors Destructors Instance variables Instance methods
◦ Declaration◦ The “.” operator◦ Objects as parameters to functions
6 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◦ Simple makefiles
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.
Pencils and erasers We will provide scratch paper No calculators