Exam2SampleQuestions-SOLUTIONS

Exam2SampleQuestions-SOLUTIONS - [ CSE115 EXAM #2 SAMPLE...

Info iconThis preview shows pages 1–2. 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. See answer posted on website . 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. See answer posted on website . 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;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Exam2SampleQuestions-SOLUTIONS - [ CSE115 EXAM #2 SAMPLE...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online