COS1521: Second Semester: ASSIGNMENT 02 – 2016

By | January 6, 2017
Due date: 28 September 2016
Study material: (1) F&M: chapters 5–14, but excluding chapter 12
(2) Tutorial Letter 102: Part I: units 5–14

Please read the relevant study material in F&M and Tutorial Letter 102 before you begin this assignment. See more information about Tutorial Letter 102 in section 2.3 of this tutorial letter.

Submission procedure: Via myUnisa (see section 8.4)

Contribution to semester mark: 60%

Unique assignment number: 700624

This assignment is compulsory: the mark you obtain for this assignment contributes to your semester mark.

  •  Each multiple-choice question has four possible answers. Select the alternative you consider to be the most appropriate.
  • Submit your assignment via myUnisa by the due date. Do not be concerned if myUnisa is down on the due date. If this happens, we are notified about the situation and will take this type of delay into consideration. Try to resubmit the assignment as soon as myUnisa is up again.
  • The mark that you achieve out of a possible 50 marks will be converted to a percentage and will contribute 60% towards your semester mark.

Second semester: Assignment 02

QUESTION 1

A computer uses memory-mapped I/O addressing. The address bus uses 7 lines (7 bits). If memory is made up of 80 words, how many four-register controllers can be accessed by the computer?

1. 12
2. 16
3. 48
4. 60

ANS: 1

Page reference in F&M: 115; 119

QUESTION 2

In the fetch stage of the machine cycle used by the CPU, …

1. instructions are decoded by the control unit.
2. the contents of two input registers are added.
3. the address of the instruction to be copied is held in the program counter register.
4. the task order is sent to a component in the CPU.

ANS: 3

Page reference in F&M: 121

QUESTION 3

Which one of the following statements describes a property of RISC computer architecture?

1. A small set of instructions execute a minimum number of simple operations.
2. A complex instruction is transformed into a set of simple operations and then executed by the CPU.
3. It is easier than other designs because there is a single instruction for both simple and complex tasks.
4. Micromemory holds the set of operations for each complex instruction in the instruction set.

ANS: 1

Page reference in F&M: 124

QUESTION 4

There are four basic network topologies. Which network topology has the following advantage and disadvantage?

Advantage: Each connection can carry its own data load.
Disadvantage: A large amount of cabling and a large number of input/output ports are required.

1. Mesh
2. Star
3. Bus
4. Ring

ANS: 1

Page reference in F&M: 147

QUESTION 5

Which of the following is a form of complex network operated by a service provider?

1. A backbone
2. A LAN
3. A hub
4. A workstation

ANS: 1

Page reference in F&M: 149

QUESTION 6

According to F&M, how many layers does the TCP/IP protocol suite have?

1. 3
2. 4
3. 5
4. 6

ANS: 3

Page reference in F&M: 151, 152

QUESTION 7

Transport layer protocols have been designed for the TCP/IP protocol suite. Which one of the following statements regarding the user datagram protocol (UDP) is not true?

1. It is also known as a connection protocol.
2. It is one of the three transport layer protocols.
3. It is simple and fast.
4. It does not provide a logical connection between packets belonging to a single message.

ANS: 1

Page reference in F&M: 157

QUESTION 8

There are several layers in a TCP/IP protocol suite. What is the physical layer responsible for?

1. Provision of services to the users
2. Node-to-node delivery of frames
3. The movements of individual bits from one node to the next
4. The logical delivery of a message between client and server processes

ANS: 3

Page reference in F&M: 163

QUESTION 9

Documents on the WWW can be grouped into categories. Which type of document is created by a web server whenever a browser requests a document?

1. Static
2. Dynamic
3. Active
4. Hanging

ANS: 2

Page reference in F&M: 177

QUESTION 10

Which one of the following statements regarding the evolution of computer operating systems and hardware is not true?

1. Batch operating systems were designed in the 1950s to control mainframe computers.
2. In the 1950s computers used punched cards for input.
3. Multiprogramming and time-sharing required the operating system to do scheduling.
4. Parallel operating systems required one CPU on one computer when they were first used.

ANS: 4

Page reference in F&M: 189, 190

QUESTION 11

An operating system (OS) can be programmed in such way that its higher layers can be changed without affecting its lower layers. This property refers to the … of the OS.

1. extensibility
2. reliability
3. compatibility
4. portability

ANS: 1

Page reference in F&M: 206

QUESTION 12

In multiprogramming, more than one program is in memory at the same time. Which one of the following is not a memory management technique during multiprogramming?

1. Demand partitioning
2. Demand segmentation
3. Partitioning
4. Demand paging

ANS: 1

Page reference in F&M: 192-196

QUESTION 13

In paging, the memory is divided into equal-sized sections called …

1. segments.
2. threads.
3. frames.
4. pages.

ANS: 3

Page reference in F&M: 194

QUESTION 14

Modern operating systems use three different terms that refer to a set of instructions: program, job and process.
Which of the following states are applicable to a process?

1. Ready, running and terminate
2. Waiting, running and terminate
3. Hold, ready and running
4. Ready, waiting and running

ANS: 4

Page reference in F&M: 197;198

QUESTION 15

The operating system synchronises different processes with different resources, but a deadlock can occur. There are four necessary conditions for a deadlock to occur. Which of the following is the correct description of the ‘NO PREEMPTION’ condition?

1. The operating system cannot temporarily relocate a resource.
2. Only one process can hold a resource.
3. A process holds a resource even though it cannot use it until other resources are available.
4. All processes and resources involved form a loop.

ANS: 1

Page reference in F&M: 200

QUESTION 16

A list contains the following elements:

7 10 17 19 35 40 48 69 76 81 83 98 110

At the beginning, first = 1, mid = 7 and last = 13. What are the values of first, mid and last respectively after two more iterations of the binary search algorithm if the goal is 35?

1. 1, 3, 6
2. 1, 7, 13
3. 4, 5, 6
4. 7, 10, 13

ANS: 3

Page reference in F&M: 230; 231

QUESTION 17

A list contains the following elements:

30 34 44 21 63 15 89

What is the order of the elements in the list after three passes if selection sort is used?

1. 15 21 44 34 63 30 89
2. 15 30 21 34 44 63 89
3. 15 21 30 34 63 44 89
4. 15 21 30 34 44 63 89

ANS: 3

Page reference in F&M: 225; 226

QUESTION 18

Certain constructs are needed for a structured program. Which of the following is a construct that tests a condition?

1. Selection
2. Diversion
3. Sequence
4. Repetition

ANS: 1

Page reference in F&M: 217; 218

QUESTION 19

Which one of the following statements regarding search algorithms is true?

1. A sequential search is usually used for big lists.
2. A sequential search is generally very slow.
3. A binary search requires the list to be unsorted.
4. A binary search starts at the beginning of the list.

ANS: 2

Page reference in F&M: 230

QUESTION 20

An English-language-like representation of a step-by-step solution that expresses a logical solution to a particular problem of interest is best described as …

1. a process.
2. an algorithm.
3. a program code.
4. a pseudocode.

ANS: 4

Page reference in F&M: 219

QUESTION 21

Which one of the following is not true in relation to subalgorithms?

1. They are more difficult to understand than the main algorithm.
2. They are subunits of main algorithms.
3. They can be called many times by the main algorithm.
4. They can be broken down into other subalgorithms.

ANS: 1

Page reference in F&M: 218

QUESTION 22

The only language understood by computer hardware is … language.

1. scientific
2. natural
3. machine
4. mnemonic

ANS: 3

Page reference in F&M: 242

QUESTION 23

The two methods used in computer translation are …

1. decoding and interpretation.
2. interpretation and encoding.
3. compilation and encoding.
4. compilation and interpretation.

ANS: 4

Page reference in F&M: 245

QUESTION 24

The two methods that are used for translating a program into machine language both follow the same translation process. What is the first step in the process?

1. Syntax analysis
2. Semantic analysis
3. Code generation
4. Lexical analysis

ANS: 4

Page reference in F&M: 245

QUESTION 25

In which two forms can a final program in Java be?

1. An application or an applet
2. A function or a procedure
3. A procedure or an applet
4. An application or a function

ANS: 1

Page reference in F&M: 252

QUESTION 26

What name is given to procedures in the object-oriented paradigm?

1. Algorithms
2. Actors
3. Subroutines
4. Methods

ANS: 4

Page reference in F&M: 250; 251

QUESTION 27

Which programming language paradigm is based on deduction?

1. Functional
2. Procedural
3. Declarative
4. Object-oriented

ANS: 3

Page reference in F&M: 254

QUESTION 28

The waterfall model is one of the most common models for the development process of the software lifecycle. Which of the following would you consider to be the third stage of the model?

1. Design
2. Implementation
3. Analysis
4. Testing

ANS: 2

Page reference in F&M: 273

QUESTION 29

A number of diagrams can be used during the analysis phase of the object-oriented analysis process in software development. Which of the following will not be used during this phase?

1. State diagram
2. Class diagram
3. State chart
4. Use case diagram

ANS: 1

Page reference in F&M: 274; 275

QUESTION 30

What term refers to the process of breaking down a whole task into smaller tasks during the design phase of the software life cycle?

1. Modularity
2. Polymorphism
3. Subpackaging
4. Encapsulation

ANS: 1

Page reference in F&M: 277

QUESTION 31

Which one of the following statements regarding modules in a software system is not true?

1. Loosely coupled modules are more likely to be reused.
2. Cohesion between modules must be minimised.
3. Cohesion is a measure of how closely the modules are related.
4. Coupling is a measure of how tightly two modules are bound to each other.

ANS: 2

Page reference in F&M: 278

QUESTION 32

Maintainability is one of the measures for software quality. Maintainability includes …

1. reusability, interoperability and portability.
2. changeability, usability and correctability.
3. changeability, flexibility and testability.
4. reliability, timeliness and flexibility.

ANS: 3

Page reference in F&M: 279; 280

QUESTION 33

Documentation is needed for proper and efficient usage and maintenance of software. System documentation …

1. defines the software itself.
2. describes the installation and the servicing of the software.
3. can be a very powerful marketing tool.
4. shows how to use the software step by step.

ANS: 1

Page reference in F&M: 284

QUESTION 34

Which one of the given options is described by the following two statements?

 It represents a set of data items that share a specific relationship.
 It uses a collection of related variables that can be accessed either individually or as a whole.

1. Data structure
2. Method
3. Program
4. Object

ANS: 1

Page reference in F&M: 290

QUESTION 35

Which one of the following best describes what an array is?

1. A collection of fields that are all related to one object.
2. A sequenced collection of elements, normally of the same data type.
3. A collection of elements called fields.
4. A collection of elements called records.

ANS: 2

Page reference in F&M: 290

QUESTION 36

Which of the following operations cannot be defined on array data structures?

1. Deletion
2. Retrieval
3. Transversal
4. Append

ANS: 4

Page reference in F&M: 294

QUESTION 37

Given a node to insert into a linked list, if the predecessor node has a null pointer, then you are adding to …

1. the beginning of the list or an empty list.
2. the body of the list or the end of the list.
3. an empty list or the end of the list.
4. the beginning of the list or the end of the list.

ANS: 3

Page reference in F&M: 305

QUESTION 38

What is the first step in traversing a linked list?

1. Checking for the last node
2. Creating a walking pointer to the first node
3. Allocating a pointer to a node
4. Setting up a loop

ANS: 2

Page reference in F&M: 310

QUESTION 39

Which one of the following statements regarding linked lists is not true?

1. A linked list is a suitable structure if a large number of insertions and deletions are needed.
2. A linked list can grow infinitely and shrink to an empty list.
3. The name of a linked list is the name of the head pointer that points to the first node of the list.
4. A linked list is inefficient for storing data that needs a lot of insertions.

ANS: 4

Page reference in F&M: 310; 311

QUESTION 40

Which one of the following statements regarding sequential files is not true?
1. To access a file sequentially, a sequential file structure can be used.
2. There are only three files associated with an update program: the old and new master files, and the transaction file.
3. All the files need to be sorted on the same key to make the updating process efficient.
4. A loop is used to read and process records one by one.

ANS: 2

Page reference in F&M: 352

QUESTION 41

A hashed file is a random access file in which a … maps a key to an address.

1. function
2. transaction
3. relation
4. connection

ANS: 1

Page reference in F&M: 355

QUESTION 42

When a collision occurs, the address produced by a hashing algorithm is called the … address.

1. home
2. synonym
3. linked
4. prime

ANS: 1

Page reference in F&M: 358

QUESTION 43

Which one of the following collision resolution mechanisms uses a node that can accommodate more than one record?

1. Open addressing
2. Division remainder hashing
3. Bucket hashing
4. Linked list resolution

ANS: 3

Page reference in F&M: 359

QUESTION 44

Which one of the following statements regarding directories is not true?

1. A directory performs the same function as a folder in a filing cabinet.
2. In most operating systems a directory is represented as a special type of file that holds information about other files.
3. Directories are provided by most operating systems for organising files.
4. In most operating systems directories are organised like a tree abstract data type in which each directory has a parent directory.

ANS: 4

Page reference in F&M: 360

QUESTION 45

Which level of a database defines the logical view of the data?

1. Architectural
2. Internal
3. Conceptual
4. External

ANS: 3

Page reference in F&M: 372

QUESTION 46

Which one of the following is a database model that has become obsolete?

1. Object-oriented
2. Distributed
3. Relational
4. Network

ANS: 4

Page reference in F&M: 372

QUESTION 47

What name is given to a record of relation (table)?

1. Attribute
2. Tuple
3. Field
4. Cardinality

ANS: 2

Page reference in F&M: 375

QUESTION 48

Which query language is often used in relational databases?

1. ANSI
2. SQL
3. ISO
4. QRD

ANS: 2

Page reference in F&M: 375

QUESTION 49

In a fragmented distributed database, …

1. each site holds an exact replica of another site.
2. objects and their relations are defined.
3. data are localised.
4. any modification to data stored in one site is repeated exactly at every site.

ANS: 3

Page reference in F&M: 386

QUESTION 50

Which query language is often used in object-oriented databases?

1. HTML
2. Prolog
3. XML
4. Scheme

ANS: 3

Page reference in F&M: 386

II—oooOooo—II

Assignments help lecturers to see whether you understand the module, and they help you to learn the work and prepare for exams. They’re critical and compulsory – you won’t be allowed to write the examination unless you’ve completed the relevant assignments. Please note that you need to study hard in preparation for exams.

Leave a Reply

Your email address will not be published. Required fields are marked *