CIS120 Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The term "lossless decomposition" refers to a decomposition of one relation into several relations such that _________.

no information is lost

Identify two database models

relational and object-oriented

Define: Program

A representation of an algorithm

Given the two relations X and Y below X: A B Y: C D 7 s t 1 3 z r 2 1 u what values would be retrieved by executing the following statement? SELECT X.A, X.B, Y.C FROM X, Y WHERE X.A < Y.D

1, u, t

In an object-oriented design using UML, _________ diagrams are used to represent classes and their basic relationships, whereas _________ diagrams are used to represent communication between objects.

1. Class 2. Sequence

Fill in the blanks of sequential search algorithm def Search (List, TargetValue): if (___________): Declare search a failure else: Select the first entry in List to be TestEntry while (___________> __________): Select the next entry in List as TestEntry if (____________== ____________): Declare search a success else: Declare search a failure

1. List is empty 2. TargetValue 3. TestEntry 4. _TargetValue 5. TestEntry

Fill in the blanks of binary search algorithm def Search(List, TargetValue): if (____________): Report that the search failed else: TestEntry = _______________ if (____________== __________): Report that the search succeeded if (_____________< ____________): Sublist = portion of List preceding TestEntry Search(Sublist, TargetValue) if (________________> _____________): Sublist = portion of List following TestEntry Search(Sublist, TargetValue)

1. List is empty 2. middle entry in the List 3. TargetValue 4. TestEntry 5. TargetValue 6. TestEntry 7. TargetValue 8. TestEntry

In the context of the object-oriented paradigm, __________ are templates from which ___________ are constructed. We say that the latter is an instance of the former.

1. classes 2. objects

As a general rule, one should strive to ____________ (maximize or minimize) coupling between modules and to ____________ (maximize or minimize) cohesion within modules

1. minimize 2. maximize

In a relational database, information is presented as though it were stored in tables called _______, each of which has columns called ________ and rows called _________.

1. relations 2. attributes 3. tuples

Two special forms of lists are the LIFO structure known as a(n) _____, in which entries are inserted and removed from the ______, and the FIFO structure known as a(n) _______, in which entries are removed from the ______ and inserted at the _____.

1. stacks 2. top 3. queues 4. head 5. tail

At most, how many entries in a list of 5000 names will be interrogated when using the binary search algorithm?

13

The following is a program segment and the definition of a function named sub. X = 3; def sub(Y): sub(X) Y = 5; print(X); What value will be printed by the program segment if parameters are passed by value?

3

When searching for the entry X within the list: R, S, T, U, V, W, Z - how many entries will be considered before discovering that the entry is not present? (Note that the list is in alphabetical order. Using binary search algorithm)

3

The following is a program segment and the definition of a function named sub. X = 3; def sub(Y): sub(X) Y = 5; print(X); What value will be printed by the program segment if parameters are passed by reference?

5

What sequence of values will be printed when the following instructions are executed? X = 5 while (X < 7): print(X) X = X + 1 print(X) while (X > 2): print(X) X = X - 2

5, 6, 7, 7, 5, and 3

What sequence of values will be printed when the following instructions are executed? X = 5 if (X < 7): print(6) Y = 6 else: print(4) Y = 4 if (Y < 5): print(3) else: print(2)

6 and 2

When searching for the entry X within the list: R, S, U, T, Z, W, Z, V - how many entries will be considered before discovering that the entry is not present? (Note that the list is not in alphabetical order. Using sequential search algorithm)

8

Answer the following questions in terms of the tree below A. The root node is _______. B. Three nodes that are siblings are ____, ____, and _____. C. The terminal nodes are __, __, __, and __. D. The node with only one child is ___.

A. A B. B, C, and D C. E, F, G, and D D. B

Which of the following handles communication with the user of a database?A. Application software B. Database management system C. Actual database

A. Application software

Which of the following is a form of glass-box testing? A. Basis path testing B. Boundary value analysis C. Beta testing

A. Basis path testing

In each of the following, indicate whether the information would be represented within a use case diagram, a class diagram, or a sequence diagram. A. __________ The methods within a class B. ___________ The ways in which the system will interact with its environment C. ____________ The manner in which its internal objects will interact D. _____________ Relationships among classes

A. Class Diagram B. Use Case Diagram C. Sequence Diagram D. Case Diagram

Which of the following data mining techniques would be applied when trying to identify traits that characterize the citizens of a democracy who fail to vote? A. Class description B. Class discrimination C. Cluster analysis D. Association analysis

A. Class description

Which of the following features within a DBMS is not provided to maintain database integrity? A. Concurrent transaction processing B. Log C. Locking protocol D. Commit points

A. Concurrent transaction processing

Which of the following is not a step in the process of translating a program? A. Executing the program B. Parsing the program C. Lexical analysis D. Code generation

A. Executing the program

In each case below indicate whether the activity is a form of glass-box testing or black-box testing. A. ___________ Basis path testing B. ___________ Boundary value analysis

A. Glass-Box Testing B. Black-Box Testing

Which of the following is not a loop? A. If -else statement B. While statement C. Repeat statement D. For statement

A. If -else statement

Most machine languages are based on the A. Imperative paradigm B. Declarative paradigm C. Functional paradigm D. Object-oriented paradigm

A. Imperative paradigm

Identify the stage of software development in which each of the following activities is performed. A. ____________: Programming is conducted. B. ______________ : Class diagrams are drawn. C. ____________ : User needs are analyzed.

A. Implementation B. Design C. Analysis

Which of the following is a means of defining similar yet different classes in an object-oriented program? A. Inheritance B. Parsing C. Coercion D. Code optimization

A. Inheritance

When searching within the list: Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom - which of the following entries will be found most quickly using the sequential search algorithm? A. Lewis B. Pat C. Tom

A. Lewis

Under the assumption that N takes on only integer values, which of the following is the termination condition in the following recursive function? def xxx(N): if (N < 5): print(N) else: xxx(N - 1) A. N < 5 B. N > 4 C. N > 5

A. N < 5

Which of the following is most likely an example of a many-to-many relationship? A. Subscribers and magazines B. Birth dates and people C. Planets and their moons D. Dinner guests and table settings

A. Subscribers and magazines

Indicate how each of the following types of programming languages is classified in terms of generation (first generation, second generation, or third generation). A. High-level languages ____________________ B. Machine languages _____________________ C. Assembly languages _____________________

A. Third Generation B. First Generation C. Second Generation

Which of the following is an example of a tree structure? A. Waiting line B. Stack of books C. List of courses D. Organization chart

A. Waiting line

Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? repeat: . . . until (X < 5) A. X < 5 B. X > 4 C. X > 5

A. X < 5

Define: Algorithm

An ordered collection of unambiguous, executable steps that defines a terminating process

Which of the following is not a potential problem caused by multiple transactions manipulating a database at the same time? A. Lost update problem B. Clustering C. Deadlock D. Incorrect summary problem

B. Clustering

Which of the following is not a tool for designing modular systems? A. Structure charts B. Data dictionaries C. Class diagrams D. Sequence diagrams

B. Data dictionaries

Which of the following is a means of controlling the complexity of a software system? A. CRC cards B. Modularity C. Specifications D. Beta testing

B. Modularity

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): while (X < 5): while (X < 5): X = X X = X + 1 X = X - 1

B X = 3 while (X < 5): X = X +1

Which of the following is not a possible value of the expression 4 + 6 / 2 - 1 A. 4 B. 5 C. 6 D. 10

B. 5

Which of the following data mining techniques would be applied when trying to identify traits that predict whether a citizen in a democracy will or will not vote? A. Class description B. Class discrimination C. Cluster analysis D. Association analysis

B. Class discrimination

Which of the following is the base case in the recursive function below? def xxx(N): if (N == 0): print(N) else: xxx(N - 1) A. N > 0 B. N = 0 C. N < 0

B. N = 0

Under the assumption that N takes on only integer values, which of the following is the termination condition in the following recursive function? def xxx(N): if (N < 5): xxx(N + 1) else: print(N) A. N < 5 B. N > 4 C. N < 4

B. N > 4

Which of the following is not used when determining the location of an entry in a two-dimensional array stored in row-major order? A. Indices B. Number of rows in the array C. Address polynomial D. Number of columns in the array

B. Number of rows in the array

When searching within the list: Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom - which of the following entries will be found most quickly using the binary search algorithm? A. Lewis B. Pat C. Tom

B. Pat

Which of the following is a representation? A. Algorithm B. Program C. Process

B. Program

Which of the following is not associated with object-oriented programming? A. Inheritance B. Resolution C. Encapsulation D. Polymorphism

B. Resolution

Suppose you were going to retrieve items of data that you would later need to process in the opposite order from that in which they were retrieved. Which of the following would be the best structure in which to store the items? A. Tree B. Stack C. Queue D. Traditional linked list

B. Stack

Which of the following is a LIFO structure? A. Array B. Stack C. Queue D. Tree

B. Stack

Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? while (X < 5): A. X < 5 B. X > 4 C. X < 4

B. X > 4

If a class diagram indicates a one-to-one relationship between class X and class Y, then A. there will be only one object in the system of "type" X. B. each object of "type" X will be associated with only one object of "type" Y. C. there will be exactly one object of "type" X and exactly one object of "type" Y. D. an object of "type" Y cannot occur without first constructing an object of "type" X.

B. each object of "type" X will be associated with only one object of "type" Y.

If a queue contained the entries w, x, y, z (from head to tail), which of the following would be the contents after two entries were removed and the entry r was inserted? A. w, x, r B. y, z, r C. r, y, z D. r, w, x

B. y, z, r

If a queue contained the entries B, C, D (from head to tail), what would be the contents of the queue (again from head to tail) after one entry was removed and the entry A was inserted?

C, D, and A

Which of the following does not require a Boolean condition? A. If- else statement B. While statement C. Assignment statement D. For loop statement

C. Assignment statement

Which of the following is not a control statement? A. If- else statement B. While statement C. Assignment statement D. For statement

C. Assignment statement

Which of the following data mining techniques would be applied when trying to identify any underlying heterogeneity within housing patterns in a community? A. Class description B. Class discrimination C. Cluster analysis D. Association analysis

C. Cluster analysis

Which of the following is not a feature of UML? A. Use case diagrams B. Class diagrams C. Dataflow diagrams D. Sequence diagrams

C. Dataflow diagrams

Which of the following is the method proposed by UML for representing sequences of communication between objects? A. Class diagram B. Use case diagram C. Sequence diagram D. Generalization

C. Sequence diagram

Which of the following describes only the portion of a database available to a particular user? A. Database model B. Schema C. Subschema D. DBMS

C. Subschema

Suppose a binary tree contained the nodes W, X, Y, and Z. If W and X were children of Y, and Z had no children, which node would be the root? A. W B. X C. Y D. Z

C. Y

A(n) ____ is a user-defined data type that can include both data and functions. A. ad-hoc data type B. programmer type C. abstract data type

C. abstract data type

If a stack contained the entries w, x, y, z (from top to bottom), which of the following would be the contents after two entries were removed and the entry r was inserted? A. w, x, r B. y, z, r C. r, y, z D. r, w, x

C. r, y, z

Given the two relations X and Y below X: A B Y: C D 7 s t 3 2 z r 2 what value would be retrieved by executing the following SQL statement? SELECT Y.C FROM X, Y WHERE X.A > Y.D A. s B. z C. t D. r

C. t

Suppose a queue contained the entries A, B, C, D (from head to tail) and suppose that the entries were removed and pushed on a stack one at a time until the queue was empty. What would be the contents of the queue (again from head to tail) if the entries were then popped from the stack and inserted back in the queue one at a time.

D, C, B, and A

Given the relation below X: A B C 2 5 7 3 3 6 4 4 2 5 2 2 what values will be retrieved by the following SQL statement? SELECT A, B FROM X WHERE X.B = X.C A. 2, 5 B. 3, 6 C. 2, 2 D. 5, 2

D. 5, 2

Which of the following is not a means of repeating a block of instructions? A. Pretest loop B. Posttest loop C. Recursion D. Assignment statement

D. Assignment statement

Which of the following data mining techniques would be applied when trying to identify common properties between different groups of shoppers? A. Class description B. Class discrimination C. Cluster analysis D. Association analysis

D. Association analysis

Which of the following is an example of a language that is based on the object-oriented paradigm? A. LISP B. PROLOG C. C D. C++

D. C++

Which of the following is ignored by a compiler? A. Control statements B. Declarations of constants C. Function headers D. Comment statements

D. Comment statements

Which of the following is most likely an example of a one-to-one relationship? A. Subscribers and magazines B. Birth dates and people C. Students and courses D. Dinner guests and table settings

D. Dinner guests and table settings

Which of the following is a way of testing the design of a software system? A. Entity-relationship diagram B. Class diagram C. Structure chart D. Structured walkthrough

D. Structured walkthrough

Which of the following is not represented in a class diagram? A. Generalizations B. The methods within a class C. The attributes within a class D. The number of instances each class will have

D. The number of instances each class will have

Which of the following is a FIFO structure? A. Array B. Stack C. Queue D. Tree

D. Tree

Which of the following is not a means of locating an entry in a linked storage structure? A. head pointer B. child pointer C. root pointer D. null pointer

D. null pointer

Identify two forms of inter-module coupling.

Data coupling and Control coupling

Place an X in the space before those requests below that require data mining techniques rather than traditional database techniques. Leave the other spaces blank. ___ Identify all shoppers who bought dog food last week. ____ Identify items that tend to be purchased by common shoppers. ____ Identify any correlation between time-of-day and items purchased. ___ Identify the items purchased during the first hour after opening the store.

Identify items that tend to be purchased by common shoppers. Identify any correlation between time-of-day and items purchased.

In which direction does an unchecked queue crawl through memory (in the direction of its head or in the direction of its tail)?

In the direction of its tail

List four data types that occur as primitive types in many high-level programming languages (you may assume any high-level programming language).

Integer, Real, Boolean, and Character

Based on the sketch of a class definition below, which methods can be invoked from outside an instance of the class? class Example {public void method1( ) { . . . } private void method2( ) { . . . } public void method3( ) {...} private void method4( ) { . . .}}

Method 1 and Method 3

The services of which modules are directly used by module A?

Modules B, C, and D

What modules directly use the services of module E?

Modules C and D

Give an example of a one-to-many relationship in reality.

Mother to children as a mother can have many children but each child has only one mother

Suppose the binary search algorithm was being used to search for the entry Tom in the list: Nathan, Oliver, Pat, Quincy, Rodger, Stan, Tom What would be the first entry in the list to be considered?

Quincy

Suppose the binary search algorithm was being used to search for the entry Tom in the list: Nathan, Oliver, Pat, Quincy, Rodger, Stan, Tom What would be the second entry in the list to be considered?

Stan

Suppose a relation X had the attributes PartID (part identification number), StockGoal (quantity held when fully stocked), and CurrentQuantity (quantity actually in stock). Complete the following statement to obtain information about those parts that are not fully stocked. Result <- SELECT from X where ______________

StockGoal ≠ CurrentQuanity

Given the relation Employees containing the attributes Name, Address, and CurrentJobID and the relation Jobs containing the attributes JobID, SkillRating, Department, what question is answered by the following SQL statement? SELECT SkillRating FROM Employees, Jobs WHERE Employees.Name = "Joe Smith" AND Employees.CurrentJobID = Jobs.JobID

What is the skill rating of Joe Smith's job?

List four data mining techniques.

class description, class discrimination, cluster analysis, and outlier analysis

31. Given the three relations X, Y, and Z below X: A B Y: C D Z: E F 7 s t 4 2 w 3 z r 2 3 q 1 u what values would be retrieved by executing the following statement? SELECT X.B, Y.C, Z. FFROM X, Y, ZWHERE X.A > Y.D AND X.A = Z.E

z, r, q


Kaugnay na mga set ng pag-aaral

Holistic Genes and Development Part 3

View Set

▶Chapter 1: Quiz#1 《Lesson 1-Lesson 3 pp. 1-30》Lesson 2

View Set

Chapter 28: Head and Spine Injuries

View Set

Culture et Civilisation Leçons 1-6

View Set