M206-sample-midterm-exam

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View M206-sample-midterm-exam as PDF for free.

More details

  • Words: 716
  • Pages: 6
‫‪Arab Open University‬‬ ‫‪Faculty of Computer Studies‬‬ ‫‪Information Technology and Computing‬‬ ‫‪M206: Computing: An Object-Oriented Approach‬‬ ‫‪Fall 2004/2005‬‬ ‫‪FORM A‬‬

‫‪The Midterm Exam‬‬ ‫‪Student ID‬‬ ‫‪Student Name‬‬ ‫‪Group Number‬‬ ‫‪Tutor Name‬‬

‫معلومات هامة‪:‬‬ ‫هذا المتحان مكون من ثلثة أجزاء‪ .‬اتبع التعليمات الموجودة في الصفحة‬ ‫‪(1‬‬ ‫التالية للجابة على السئلة‬ ‫عدد صفحات المتحان ‪ XX‬من ضمنها هذه الصفحة‪.‬‬ ‫‪(2‬‬ ‫مدة المتحان ثلث ساعات‪.‬‬ ‫‪(3‬‬ ‫يجب كتابة الرقم الجامعي والسم ورقم المجموعة واسم المعيد على هذه‬ ‫‪(4‬‬ ‫الصفحة وأيضا على صفحة الجابة‪.‬‬

FORM A

General Instructions

The exam consists of three parts. The first part consists of XX multiple choice and XX T/F. Each question is worth XX marks. You should answer all questions of part 1. You must answer this question in the answer sheet given in page XX.

The second part consists of XX short questions. Each question is worth XX marks. You should answer all questions of part 2.

The third part consists of XX long questions. Each question is worth XX marks. You should answer all the questions.

2

FORM A

Part 1(30 questions)

[60 marks]

Instructions: Answer the following XX multiple choice questions and XX T/F and fill your answers in the table of the Answers Sheet given at the end of Part 1. 1. Number of expressions which separated by full stops are called a. Message expressions b. Keyword Expression c. Expression series d. a and c 2. At LearningWorks, while you are working in a LearningBook you may want to see more than one page at a time. To do so, you click on a command button in order to display several windows at the same time. That button is: a. Forward b. Back c. Detach d. Find 3. Syntax errors can be results of a. Incorrectly punctuating a method in a class browser pane. b. Misspelling a variable or a message name. c. Omitting to declare a variable. d. All of above 4. A Smalltalk block a. Can have arguments b. Returns the result of evaluating the last expression in the block. c. Is an instance of BlockClosure class d. All of the above 5. Elements of instances of the Dictionary class a. Have to be instances of Association class b. Can be instances of any class c. Have to be instances of Set class d. Have to be instances of Key class

3

Question 2: Choose if the following are True or False, your answers in the table of the Answers Sheet given at the end of Part 1.

1- The messages add: and remove: are part of the common protocol of Set and Array

 true

 false

2- A user interface designer should ignore the age, cultural and ethnic background of likely users. Indicate whether this is true or false. (tick the appropriate box) true



false

Answer Sheet of Part 1 ‫لن يصحح هذا الجزء من المتحان ما لم تمل هذه الصفحة‬ Part I

Part (1) Q.1 Question Answer

Question

1 1

2

2

3

3

4

4

5

5

6 7

4

Q.2 Answer T or F

FORM A

Part 2(XX questions)

[XX marks]

Instructions: Answer the following XX short questions. Each question is worth XX marks. You should answer all questions of Part 2. 1.

Define the following terms User interface: Affordance: Domain model:

2. Mention the names of two types of dialogs that can be created using Smalltalk expressions and list the possible message answers for them.

3.

Show the order of evaluation of the following expression

account1 credit: account1 balance + account2 balance / 2

FORM A

5

Part 3(Answer XX long questions)

[XX marks]

Instructions: Answer the following three long questions. Each question is worth XX marks. Question 1 (xx marks): Write a complete method for the following tasks. Each method must have a comment that specifies the function of the method 1. For a Frog class object write a method to move the frog 3 steps to the left

2. For a Frog class object, write a method to set the height of the frog to height plus (Up) or minus (Down) aNumber. The method has two arguments. The first argument is the direction (either Up or Down). The second argument is the number added (in case of Up) or subtracted (in case of Down) from the original height.

6