{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sample-final

# sample-final - EECS 280 Final Fall 2006 This is a...

This preview shows pages 1–6. Sign up to view the full content.

EECS 280 Fall 2006 1 EECS 280: Final Fall 2006 This is a closed-book exam; no notes are allowed. There are 5 problems on 13 pages. Read the entire exam through before you begin working. Work on those problems you find easiest first. Read each question carefully, and note all that is required of you. Keep your an- swers clear and concise, and state all of your assumptions carefully. Each question has a box for your answer; please put your answers in the boxes provided. You are to abide by the University of Michigan/Engineering honor code. Please sign below to signify that you have kept the honor code pledge. Honor code pledge: I have neither given nor received aid on this exam. Signature: _________________________________________ Name: _________________________________________ Uniqname: _________________________________________

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Uniqname:________________________________________________________________________________ EECS 280 Fall 2006 2
Uniqname:________________________________________________________________________________ EECS 280 Fall 2006 3 Problem 1 _________ out of 20 Problem 2 _________ out of 20 Problem 3 _________ out of 20 Problem 4 _________ out of 20 Problem 5 _________ out of 20 Total: ________ out of 100

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Uniqname:________________________________________________________________________________ EECS 280 Fall 2006 4 1 Short Answer Questions 1.a Containers In two sentences or less, explain the differences between a templated container and one that holds polymorphic objects. 1.b Function Dispatch Consider the following snippet of code: class Foo { public: void bar() {cout << "In Foo’s bar\n";} virtual void baz() {cout << "In Foo’s baz\n";} }; class Quux : public Foo { public: void bar() {cout << "In Quux’s bar\n";} virtual void baz() {cout << "In Quux’s baz\n";} }; int main() { Foo *foo = new Quux; foo->bar(); foo->baz(); return 0; } What is the output when main() runs?
Uniqname:________________________________________________________________________________ EECS 280 Fall 2006 5 1.c Using Abstract Base Classes Suppose that we want to modify our Blackjack simulator so that an arbitrary number of players can play the game at a time (to more accurately reflect how it is played in a real casino). Modify the following code to work with our new Blackjack simulator.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 13

sample-final - EECS 280 Final Fall 2006 This is a...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online