1
1
1
Exam aids: This is a closed-book exam. The only student materials allowed are pencils,
erasers and an approved paper (not electronic) English-Chinese dictionary.
General Instructions: Write your answers on separate sheets of paper and do not write your
answers on the pages of the exam. Start each section of the exam on a new sheet of paper.
Write on only one side of each answer sheet and put your name at the top of each answer
sheet. If the question is unclear to you, explain the ambiguity and your interpretation of the
question in your answer. Try to answer all of the exam questions and use illustrations in order
to get partial credit for the question. However, if the question asks for exactly two responses,
do not answer with three or more alternative answers.
Note that some of the questions related to Chapter 2 (Data Manipulation) refer to
Appendix 1: language description table on the last page of this exam.
Scoring: There are a total of 75 questions and a maximum of 100 points in this exam. At least
50% of the maximum number of points must be scored in order to get a passing grade. The
ECTS scale will be used on all passing grades (i.e., grades of A, B, C, D and E will be given).
The questions are not listed in order of difficulty.
GOOD LUCK!
Chapters 1 - 5
1.1 What is the result of the binary operation 11110000 XOR 00000000 ?
ANSWER: A
1.2 What is the base ten value of the binary fraction 101.110 ?
ANSWER: C
1.3 Which of the following instructions falls into the category of data transfer instructions?
1.4 When a STORE operation is performed, what information besides the data to be stored
must be sent over the bus to main memory by the CPU?
ANSWER: D
1.5 The end of a time slice is indicted by the occurrence of a signal called
ANSWER: A
1.6 Which of the following items of information would not be contained in an operating
system’s process table?
ANSWER: B
1.7 Which of the following is a mechanism that limits the number of times that a packet is
forwarded as it is routed through the Internet?
ANSWER: D
1.8 Which layer of the TCP/IP hierarchy directs message segments through the Internet so that
they get closer and closer to their destination?
ANSWER: C
1.9 Which of the following set of instructions defines an algorithm in the formal, strict sense?
A. X ← 3; B. X ← 3; C. X ← 3;
while (X < 5)do while (X < 5) do while (X < 5) do
(X ← X) (X ← X + 1) (X ← X - 1)
ANSWER: B
1.10When searching within the list
which of the following entries will take the least time to find using the binary search algorithm?
A. Maurice B. Nathan C. Oliver
ANSWER: C
ANSWER: C
1.12What is a set of instructions for performing a task that can be used as an abstract tool by
other program units?
ANSWER: B.
1.13Which one of the following was developed by the U.S. Navy for business applications?
ANSWER: A
ANSWER: A
1.15What is the conceptual shape or arrangement of data in a program to which variables are
often associated (in addition to data type)?
ANSWER: C
1.16Which of the following is a tool, used for years by software engineers, that is a central
repository of information about the data items appearing throughout a software system?
ANSWER: B
1.17What is the name of the software development model used to develop prototypes that has
recently become popular with software engineers and challenges the waterfall model?
ANSWER: D
1.18Which
one of the following refers to testing that does not rely on knowledge of the interior
composition of the software?
ANSWER: C
1.19What is the name of the software development model where a team of less than a dozen
programmers work closely together and freely share ideas and assist each other during the
development process?
ANSWER: A
1.20Which of the following items is not included in Unified modeling Language (UML)?
ANSWER: C
ANSWER: C
1.22Let X be the address of the memory cell containing the entry in the first row and first
column of a static array stored using row major order. If we let C represent the number of
columns in the array (which is the number of entries in each row), the address of the entry
in the i th row and j th column will be?
A. x+(c*(i-1))+(j-1)
B. x+(c-1)+(j*(i-1))
C. x+(c*j+1)+(i+1)
D. x+(i*(c-j)+1)
ANSWER: A
1.23If thenodes of a binary tree are stored in a single contiguous block of memory cells, which
number should be used to divide the node's position in the block if we want to find the
location of a node's parent?
A: 2 B: 3 C: 4 D: 5
ANSWER.(A)
A. Pushing an entry
B. Popping an entry
C. Removing an entry
ANSWER: B
1.25The process of reclaiming unused storage space for the future use is known as _____.
Answer: C
Section 2. Fill-in-the-blank/Short-answer Questions (There are 25 questions
in this section each worth 2 points apiece.)
Answer these questions with words, numbers and/or sentences.
Chapters 1 - 5
2.1 How many bits would be in the memory of a computer with 4 Kilobytes of main memory?
2.2 What is the largest numeric value that could be represented with three bytes if each digit
were encoded using one ASCII pattern per byte? What if binary notation were used? (Just
give an expression for the numeric value; you do not need to calculate the actual value.)
ANSWER: With ASCII, the largest numeric value is 999. With binary notation, the largest
value is 2**24 = 16,777,215.
2.3 Can AND-operations be performed directly on memory cells? Explain your answer!
ANSWER: No. The only operations that can be performed on memory cells are LOAD (from
memory cell to register) and STORE (from register to memory cell). Data must reside in a
register before it can be manipulated by a binary operation such as AND.
2.4 What are the three operations performed during each machine cycle?
2.5 Suppose an operating system allocates time slices in 5 millisecond units and the time
required for a context switch is negligible.
B. How many processes can obtain a time slice in one second if they all use only half
of their slice?
ANSWER: Multitasking means that a number of tasks are run at the same time. Time-sharing
allows tasks to share a single CPU by giving each task a time-slice.
2.7 What are two basic differences between the transport level protocols named UDP and
TCP?
ANSWER: The main purpose of a name server is to translate a domain name into an
IP-address.
2.9 What sequence of values will be printed when the following instructions are executed?
X ← 7;
while (X < 7) do
(print the value of X;
X ← X + 1)
print the value of X;
while (X > 2) do
(print the value of X;
X ← X - 2)
ANSWER: 7, 7, 5, 3
ANSWER: A programmer can move back and forth between the editor and debugging tools
with ease, as changes to the program are made and tested.
ANSWER: A function is a procedure that returns a value associated with the function
name.
ANSWER: Because the program must be rewritten to conform to the new computer’s
register configuration and instruction set.
ANSWER: One class can inherit the properties of another class by using inheritance. This
means that all of the data and methods from the parent class are inherited by the child class.
The child class usually adds some of it's own data and methods, making it different from the
parent class.
ANSWER: The idea is to produce a program that can be easily understood by a programmer
and can be shown to meet its specifications.
Answer: the purpose of technical documentation is to describe how a software system should
be installed and serviced.
2.17What is the difference between the traditional waterfall model of software development and
the newer prototyping paradigm?
2.18What are the four major stages within the development phase of the software life cycle?
ANSWER: If a software designer studies the movement of data through a system, the points at
which data formats are altered or where data paths merge and split can be identified. These are
the points at which processing occurs and where procedures must be defined.
2.21Draw a binary tree that stores the ordered list B, C, D, E, F, G, H, I, J, K so that it can be
used later on for effective searching.
ANSWER: G
/\
E I
/\ /\
C F H J
/\
B D
2.22Explain why a modern programming language such as Java does not include pointers as a
printive data type.
ANSWER: Pointers are easily misused by programmers and can cause problems when
debugging and testing programs.
2.23Name the pointers used to manage a stack stored as a contiguous block of memory cells
and then explain how these pointers are used when a new entry is pushed onto the stack.
ANSWER: There are two pointers used, one that contains the memory address of the base (or
bottom) of the stack and another that has the address of the top (usually called the stack
pointer). To push an entry, we adjust the stack pointer to the vacancy just beyond the top of
the stack.Then place the new entry at this location..
ANSWER:
A list is a collection of entries that are arranged sequentially. Beginning of list is called the head
and end of the list is called the tail.
A stack is a list in which entries are removed and inserted only at the head.
A queue is a list in which entries are removed only at the head and new entries are inserted
only at the tail.
ANSWER: The advantage is that it is a convenient storage structure for implementing static
lists. The disadvantage is when entries are added to and deleted from the list (so-called
"dynamic list") since holes will appear in the list that cannot be re-used.
Section 3. Vocabulary (Matching) Questions (There are 25 questions in this
section each worth 1 point apiece.)
Answer these questions with the one letter of the word in the list that best
matches the description.
Chapters 1 - 3
Chapters 4 - 5
3.16This is a tool that is useful during both analysis and design and expresses relationships as
one-to-one, one-to-many or mant-to-many.
3.17 A powerful tool for software engineers is the ______ which is a predeveloped method of
solving a recurring problem in software design.
3.18 The application of computer technology to the software development process has resulted
in a variety of ________ tools which continue to streamline and otherwise simplify the
software development process.
3.19 In early approaches to software engineering, engineers insisted that the entire analysis of
the system be completed first and this came to be known as the ______ model since the
development process was allowed to flow in only one direction.
3.20 One distinction between software engineering and other engineering disciplines is the lack
of qualitative techniques, called _______ , for measuring the properties of software..
A. XP B. specifications C. design
pattern
D. dataflow E. waterfall F. CRC
diagram
G. CASE H. entity- I. fountain
relationship
diagram
J. use case K. data dictionary L. metrics
diagram
M. class diagram N. parameters O. indicators
P. module Q. validation R. UML