midterm2-ver1.pdf - ENGINEER 1D04 Midterm Test 2 McMaster...

Info icon This preview shows pages 1–4. Sign up to view the full content.

ENGINEER 1D04 Midterm Test 2 McMaster University Answer Key: Large arrow ( =) for correct, small ( ) for partially correct Day Class 03, 04, Version 1 Dr. W. M. Farmer DURATION: 2 hours March 18, 2016 Please CLEARLY print : NAME: Student ID: This examination paper includes 16 pages and 30 questions. You are responsible for ensuring that your copy of the examination paper is complete. Bring any discrepancy to the attention of your invigilator. Special Instructions : 1. It is your responsibility to ensure that the answer sheet is properly completed. Your examination result depends upon proper attention to these instructions: A heavy mark must be made, completely filling the circular bubble, with an HB pencil. Print your name, student number, course name, course number and the date in the space provided on the top of Side 1 and fill in the corresponding bubbles underneath. Fill in the bubble corresponding to your version number. Mark only ONE choice from the alternatives (1, 2, 3, 4, 5 or A, B, C, D, E) provided for each question. If there is a True/False question, mark 1 (or A) for True, and 2 (or B) for False. The question number is to the left of the bubbles. Make sure that the number of the question on the scan sheet is the same as the number on the examination paper. Pay particular attention to the “Marking Directions” given on the scan sheet. Begin answering the questions using the first set of bubbles, marked “1.” Answer all questions. 2. The use of notes and textbooks is not permitted. 3. Calculators, computers, cell phones, and all other electronic devices are not to be utilized. 4. Read each question carefully. 5. Try to allocate your time sensibly and divide it appropriately between the questions. 6. Select the best answer for each question. Page 1 of 16
Image of page 1

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

Question 1 [1 mark] When choosing test cases for a software product, it is crucial to have access to the product’s requirements specification, design, and implementation. Is this statement true or false? A. True. B. False. = ANSWER: Test cases can be effectively chosen with only access to the requirements specification. Question 2 [1 mark] A software product cannot be reliable unless it is correct. Is this statement true or false? A. True. B. False. = ANSWER: A software product is reliable if it usually works correctly in normal use. A software produce can be reliable even though it works incorrectly in some cases as long as those cases are either outside normal use or infrequent when inside normal use. Question 3 [1 mark] The code below terminates. x = 1.0 y = 100.0 while x > 0: x = x / y Is this statement true or false? A. True. = B. False. ANSWER: The value of x will become smaller and smaller until its best approximation is the float 0.0. Page 2 of 16
Image of page 2
Question 4 [1 mark] For any two floating point numbers a and b with a < b , there is another floating number c such that a < c < b . Is this statement true or false?
Image of page 3

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

Image of page 4
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '10
  • SMITH

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern