Preview

Exam Paper

Good Essays
Open Document
Open Document
881 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Exam Paper
Université d’Ottawa
Faculté de génie École d’ingénierie et de technologie de l’information

University of Ottawa

Faculty of Engineering

School of Information Technology and Engineering

Introduction to Computer Science II (ITI 1121) Final Examination: Solutions
Instructor: Marcel Turcotte April 2008, duration: 3 hours

Identification
Student name: Student number: Signature:

Instructions
1. 2. 3. 4. 5. 6. This is a closed book examination; No calculators or other aids are permitted; Write comments and assumptions to get partial points; Beware, poor hand writing can affect grades; Do not remove the staple holding the examination pages together; Write your answers in the space provided. Use the backs of pages if necessary. There are two blank pages at the end. You may not hand in additional pages.

Marking scheme
Question 1 2 3 4 5 6 7 8 Total Points 10 15 15 10 5 10 15 10 90 Score

April 2008

ITI 1121

Page 2 of 25

Question 1

(10 points)

For this question, the classes Queue and Stack both implement the interface LinearCollection.
«interface» LinearCollection +add(E item):void +remove():E +isEmpty():boolean

Queue

Stack

Queue, as all the other implementations of a queue, is such that the method add enqueues the item at the rear of the queue, the method remove dequeues the front element, and the method isEmpty returns true if this queue contains no elements. Stack, as all the other implementations of a stack, is such that the method add pushes the item onto the top of the stack, the method remove pops (removes and returns) the top element, and the method isEmpty returns true if this stack contains no elements. A BinarySearchTree was created by adding elements in the order that follows; the resulting tree is shown to the right. BinarySearchTree t; t = new BinarySearchTree(); t.add( t.add( t.add( t.add( t.add( t.add( t.add( t.add( t.add( 3 1 7 9 5 4 6 2 8 ); ); ); ); ); ); ); ); );

3 1 7

2

5

9

4

6

8

A.

You May Also Find These Documents Helpful

  • Good Essays

    - Complete all of the details required on the front page of the examination booklet. - Make sure that you note the SIX(6) questions attempted on the front of your examination booklet - If Seven questions are attempted, the first SIX(6) will be marked. - You may use a non-programmable calculator - Graph paper will be provided. - Answers are to be written in ink. Pencils are permitted for graphing purposes. - The candidate may retain this paper.…

    • 1317 Words
    • 6 Pages
    Good Essays
  • Good Essays

    Comm 370 Exam

    • 3014 Words
    • 13 Pages

    Write your name and student ID at the top of this front page, and circle your section. Check the number of pages in the exam. You should have X pages. This is a 100-point exam with 7 questions. You have 2 hours to complete the exam. Carefully administer your time! No books or notes are permitted. You may use a non-programmable calculator. Only exams written in ink will be eligible for formal re-grading. Please answer the questions in the space provided after the question. Write your answers clearly and legibly. Show all details of your work. A formula sheet is provided in the last page, but be aware that the formulas given may or may not be useful to solve the questions in this exam. Do not use formulas without carefully thinking whether they are useful in a particular problem. GOOD LUCK!…

    • 3014 Words
    • 13 Pages
    Good Essays
  • Good Essays

    Econ1101 Past Exam

    • 1953 Words
    • 8 Pages

    This examination paper consists of two parts - Part A and Part B Part A consists of 20 multiple choice questions each worth one (1) mark. Answer all the questions in Part A on the answer sheet provided, using pencil only: (a) Print your student number, name and initials in the space provided and mark the appropriate boxes below your student number, name and initials. (b) For each question, mark the appropriate response (a), (b), (c), or (cl). There is only one correct response to each question in Part A.…

    • 1953 Words
    • 8 Pages
    Good Essays
  • Good Essays

    adm 3360

    • 2744 Words
    • 30 Pages

    1. This examination comprises 6 questions over 19 pages. The last two pages (pages 18…

    • 2744 Words
    • 30 Pages
    Good Essays
  • Good Essays

    Student Name ______________________________________________________________ School Name _______________________________________________________________ The possession or use of any communications device is strictly prohibited when taking this examination. If you have or use any communications device, no matter how briefly, your examination will be invalidated and no score will be calculated for you. Print your name and the name of your school on the lines above. A separate answer sheet for Part I has been provided to you. Follow the instructions from the proctor for completing the student information on your answer sheet. Then fill in the heading of each page of your essay booklet. This examination has three parts. You are to answer all questions in all parts. Use black or dark-blue ink to write your answers to Parts II, III A, and III B. Part I contains 50 multiple-choice questions. Record your answers to these questions as directed on the answer sheet. Part II contains one thematic essay question. Write your answer to this question in the essay booklet, beginning on page 1. Part III is based on several documents: Part III A contains the documents. When you reach this part of the test, enter your name and the name of your school on the first page of this section. Each document is followed by one or more questions. Write your answer to each question in this examination booklet on the lines following that question. Part III B contains one essay question based on the documents. Write your answer to this question in the essay booklet, beginning on page 7. When you have completed the examination, you must sign the declaration printed at the end of the answer sheet, indicating that you had no unlawful knowledge of the questions or answers prior to the…

    • 7115 Words
    • 29 Pages
    Good Essays
  • Good Essays

    Adm4342 Mid-Term

    • 1187 Words
    • 5 Pages

    Note to students: This is a closed-book exam, containing 3 questions, worth 30 marks in total. Apart from sundry writing materials (pens, pencils and the like), no examination aids are permitted…

    • 1187 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Exam 1

    • 1514 Words
    • 18 Pages

    5. You have five hours of continuous time to finish the examination from the time you open the…

    • 1514 Words
    • 18 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Final Exam Paper

    • 491 Words
    • 2 Pages

    True or False: A computer worm consists of segments of code that perform malicious actions.…

    • 491 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Exam paper

    • 553 Words
    • 3 Pages

    The primary method of treatment or service is problem solving, a process focused on the here and now that maximizes the identification and use of client strengths.…

    • 553 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Quiz Stre2010

    • 694 Words
    • 3 Pages

    Instructions:  Please, write your name and student number at the top of the cover page in the space provided.  Do NOT remove the staple. Keep the pages bound together.  This examination consists of eight [8] pages including the cover sheet and an extra page for longer answers  Printing is double sided, so check each side of every page is answered  You may not retain this paper. Return it before you leave.  You have seventy [70] minutes to complete this examination: o Reading time: 10 minutes o Writing time: 60 minutes     Read the questions carefully and answer all questions as instructed. This paper is marked out of 100 for 25% of the overall course grade Questions must be answered in the spaces provided in ink. This test has 2 parts: o Section A is multiple choice mixed with short answer o Section B is short answer…

    • 694 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chemistry 30s Exam Grade 11

    • 5178 Words
    • 21 Pages

    15–20% 80–85% 22 x 1 = 22 marks 46 x 1 = 46 marks 32 marks 100 marks…

    • 5178 Words
    • 21 Pages
    Satisfactory Essays
  • Good Essays

    Social Inequality Exam

    • 609 Words
    • 3 Pages

    Instructions. Unless otherwise arranged, you will have until class on February 21 to turn in this exam. Late exams will be penalized one letter grade for each day past the due date. Respond to ten of the following items. The specific question being answered should be clearly indicated at the beginning of each response. Each will count as a maximum of 6 points toward your exam grade. Please answer each item as clearly and fully as possible. Answers should be typed and double-spaced. Though clarity is essential, responses should be concise.…

    • 609 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Exam 1

    • 410 Words
    • 2 Pages

    This is a closed book exam – consultation of notes and books is not permitted during the exam.…

    • 410 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    This assignment requires you to understand a python program that manipulates some data involving a warehouse ordering system for a group of shoe stores at various locations. Based on this provided code, you are then asked to create a new python program for a different (but similar) system. You are provided with 3 files:  This document,  A data file, “orders.txt”  A Python file, “ordersystemcomplete.py”. The data file and Python file should be downloaded into the same folder. Save your copy of the Python file as system.py, for example, 20119999system.py…

    • 3019 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    Department of Information Technology LAB MANUAL IT2205 – Data Structures and Algorithm Lab INDEX 1. Array Implementation Of Stack 2. Application Of Stack – Conversion Of Infix To Postfix 3. Implementation Of Linear Queue Using Arrays 4.…

    • 3230 Words
    • 13 Pages
    Good Essays