Exam2SampleQuestions

Exam2SampleQuestions - [ CSE115 EXAM #2 SAMPLE QUESTIONS ]...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
[ CSE115 EXAM #2 SAMPLE QUESTIONS ] FALL 2009 1 Here are some possible questions. They are not necessarily indicative of the questions you will get on the exam, nor are they necessarily representative of the range of topics to be tested on the exam. Identify parts of code see question 1 of the lab 3 exercises, posted to the course web site already. Write code for relationship see question 2 of the lab 3 exercises, posted to the course web site already. Relevant relationships are association (via constructor only, via accessor and mutator only, or via constructor, accessor and mutator), composition, and realization. Given a small bit of code, draw an object diagram to show the resulting program state. For example, given this class definition: public class ShoppingCart { private Item _item; public ShoppingCart() { _item = null; } public void addItem(Item i) { _item = i; } public Item removeItem () { Item temp = _item; _item = null; return temp; } } draw an object diagram to show the resulting program state
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online