140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining...

14

Transcript of 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining...

Page 1: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.
Page 2: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

140 Total Points◦ 100 Points Writing Programs◦ 24 Points Tracing Algorithms and determining

results◦ 16 Points Short Answer

Similar to quizzes and programming assignments

Page 3: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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

Page 4: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

Can we have more than one constructor for a class? If so, how would we know which one to use?

Page 6: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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

Page 7: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

20 Points◦ Know the fundamental operations and how a

stack works Push Pop Size

Page 8: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

15 Points◦ Declaration◦ Use of the “.” operator◦ Arrays of structures

tsuPod 2◦ Pointers to structures

(*ptr).field ptr->field

Page 9: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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

Page 10: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

24 Points◦ Fundamentals of class and objects

Declaration Constructors Destructors Instance variables Instance methods

◦ Declaration◦ The “.” operator◦ Objects as parameters to functions

Page 11: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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

Page 12: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

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 13: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.

Pencils and erasers We will provide scratch paper No calculators

Page 14: 140 Total Points ◦ 100 Points Writing Programs ◦ 24 Points Tracing Algorithms and determining results ◦ 16 Points Short Answer  Similar to quizzes.