200 total points ◦ 75 points writing programs ◦ 60 points tracing algorithms and determining...
TRANSCRIPT
![Page 1: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/1.jpg)
![Page 2: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/2.jpg)
200 Total Points◦ 75 Points Writing Programs◦ 60 Points Tracing Algorithms and determining
results◦ 35 Points Short Answer◦ 30 Points Multiple Choice
Will weigh more toward last third of course Similar to previous exams, quizzes, and
programming assignments Point values are approximations
![Page 3: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/3.jpg)
Given the stack from the STL, write a function that converts a decimal number to a binary string.
![Page 4: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/4.jpg)
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;
![Page 5: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/5.jpg)
Of what order of magnitude is a Bubble Sort?
![Page 6: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/6.jpg)
40 points◦ One and two-dimensional arrays
Declaration of various types traversing Difference between physical and logical size Dynamic allocation
◦ Parallel arrays◦ Passing arrays as parameters◦ 2-D arrays
Game of Life program◦ Arrays of structures
The tsuPod 1 program◦ Arrays of Objects
The tsuPod 2 program◦ Relationship between arrays and pointers
![Page 7: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/7.jpg)
20 Points◦ Be able to look at code or algorithm and make
an educated guess at the order of magnitude Look to see if the statement that is executed the
most is a function of the size of the data set◦ Know which orders are faster and slower than
the others Constant time algorithms are denoted as O(1) O(log2n), O(n), O(n2), O(2n)
There are more
![Page 8: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/8.jpg)
15 Points◦ May have to write sequential search, but not
the others.◦ Know the algorithms and the order of
magnitude of each Sequential search Binary search Bubble sort Selection sort
![Page 9: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/9.jpg)
15 Points◦ Declaration◦ Use of the “.” operator◦ Arrays of structures
tsuPod 2◦ Pointers to structures
(*ptr).field ptr->field
◦ Use of structure as nodes in linked lists tsuPod 3 program
![Page 10: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/10.jpg)
50 Points◦ Fundamentals of class and objects
Declaration Constructors Destructors Instance variables Instance methods Class (static) variables Class (static)methods
◦ Declaration◦ The “.” operator◦ Objects as parameters to functions
![Page 11: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/11.jpg)
Overloading functions◦ Constructors◦ Operators
Relational Other
◦ Using objects as data inside of linked lists◦ Understand the Exam Grader 2 and the TsuPod
projects that used classes.
![Page 12: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/12.jpg)
25 Points◦ A pointer is a variable that holds the address of a
memory location Declaration int *ptr;
◦ Assignment ptr = &foo; //& is the address function
◦ Dereferencing *ptr = 54; //same as foo=54;
◦ You can point to any kind of data type◦ Using pointers to create linked lists
![Page 13: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/13.jpg)
15 Points◦ Know the basic commands you needed to
complete the last program◦ Know how to compile and run a C and C++
program in Linux◦ Know how to create and move around the Linux
file system◦ Simple makefiles
![Page 14: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/14.jpg)
50 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? (Big O)◦ Understand the tsuPod 3 linked list program
![Page 15: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/15.jpg)
10 Points◦ Know the fundamental operations and how a
stack works Push Pop isFull isEmpty
◦ A Last in First Out (LIFO) structure◦ Will not have to code a stack◦ Understand the Equation Checker program
![Page 16: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/16.jpg)
5 points◦ Understand the fundamental operations
enQueue deQueue isFull isEmpty
◦ A First in First Out (FIFO) structure◦ Will not have to code
![Page 17: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/17.jpg)
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.
![Page 18: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/18.jpg)
Pencils and erasers We will provide scratch paper No calculators
![Page 19: 200 Total Points ◦ 75 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 35 Points Short Answer ◦ 30 Points Multiple Choice](https://reader035.vdocument.in/reader035/viewer/2022062315/5697bfc71a28abf838ca808b/html5/thumbnails/19.jpg)