Spring08_PreQuiz3-dsf

Spring08_PreQuiz3-dsf - CS1316 Spring 2008 Pre-Quiz 3 NAME:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1316 Spring 2008 Pre-Quiz 3 NAME: ___________________________________ PRISM ID:_______________________________ Part I: Grading TA Who is your grading TA? (Circle one) Brian Daniel Joel John Ricardo Sean Tyler Victoria Part II: File I/O Suppose you were given a String: File input/output, File I/O, is sometimes hard to understand. and were asked to break it into tokens based on different delimiters. Write down the tokens if we used the delimiter: 1. space , “ ” 2. comma, “,” 3. slash, “/” 4. lowercase letter o, “o”
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS1316 Spring 2008 Pre-Quiz 3 NAME: ___________________________________ PRISM ID:_______________________________ Part III: Stacks and Queues If given the following methods: public void addToHead(Object obj) //adds object to the head of the list public void addToTail(Object obj) /adds object to the tail of the list public Object removeFromHead() //removes and returns object from the head public Object removeFromTail() //removes and returns object from the tail public Object peek() //returns but does not remove the head of the list how would you write the following methods for stacks and queues? Remember that your choice for one method of the ADT affects your choice for the other. Also the removal methods above do not check if
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Spring08_PreQuiz3-dsf - CS1316 Spring 2008 Pre-Quiz 3 NAME:...

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

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