Presentation is loading. Please wait.

Presentation is loading. Please wait.

 200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice.

Similar presentations


Presentation on theme: " 200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice."— Presentation transcript:

1

2  200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice  Will weigh more toward last third of course  Similar to previous exams, quizzes, and programming assignments

3  Given the stack.h ADT, write a function that converts a decimal number to a binary string.

4  What will the EXACT output of the following program be? i nt 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;

5  Of what order of magnitude is a Bubble Sort?

6  42 points ◦ One and two-dimensional arrays  Declaration of various types  traversing  Difference between physical and logical size  Dynamic allocation ◦ Parallel arrays  The tsuPod program ◦ Passing arrays as parameters ◦ 2-D arrays  Game of Life program ◦ Arrays of structures  The tsuPod 2 program ◦ Arrays of Objects  The tsuPod 3 program ◦ Relationship between arrays and pointers

7  24 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(log 2 n), O(n), O(n 2 ), O(2 n )  There are more

8  12 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

9  0 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

10  10 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 4 program

11  0 Points ◦ Know the fundamental operations and how a stack works  Push  Pop  Size

12  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

13  Overloading functions ◦ Constructors ◦ Operators  Relational  Other ◦ Using objects as data inside of linked lists

14  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

15  0 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

16  0 Points ◦ Given a problem, be able to provide example inputs and outputs to test potential solutions ◦ Similar to tsuPod, but much smaller problem.

17  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 4 linked list program

18  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.

19  Pencils and erasers  We will provide scratch paper  No calculators

20


Download ppt " 200 Total Points ◦ 74 Points Writing Programs ◦ 60 Points Tracing Algorithms and determining results ◦ 36 Points Short Answer ◦ 30 Points Multiple Choice."

Similar presentations


Ads by Google