Hanzo Conard
Quiz por , criado more than 1 year ago

Quiz sobre SPD, criado por Hanzo Conard em 24-05-2017.

369
0
0
Hanzo Conard
Criado por Hanzo Conard aproximadamente 7 anos atrás
Fechar

SPD

Questão 1 de 70

1

What are two parts of ADT?

Selecione uma das seguintes:

  • Private and Public

  • ArrayList and Vector

  • Queue and Stack

  • Parent and Child

  • Int and float

Explicação

Questão 2 de 70

1

Which of them has more methods?

Selecione uma das seguintes:

  • Superclass

  • Subclass

Explicação

Questão 3 de 70

1

The relationship when one class is a subclass of another is called...

Selecione uma das seguintes:

  • is-a

  • has-a

Explicação

Questão 4 de 70

1

The relationship when one class is defined inside the definition of another is called...

Selecione uma das seguintes:

  • has-a

  • is-a

  • is-b

  • has-b

  • to-c

Explicação

Questão 5 de 70

1

Redefinition of method of superclass in a subclass with the same name and number of parameters is...

Selecione uma das seguintes:

  • Override

  • Overload

  • Overhead

  • Upperload

  • Overbeat

Explicação

Questão 6 de 70

1

Redefinition of method with the same name but different number of parameters is called...

Selecione uma das seguintes:

  • Overload

  • Override

  • Overflow

  • Upperride

  • Download

Explicação

Questão 7 de 70

1

If you want to call the constructor of superclass you would use....

Selecione uma das seguintes:

  • super.

  • super()

  • this.

  • this()

  • constructor()

Explicação

Questão 8 de 70

1

If you want to call data member of superclass you would use...

Selecione uma das seguintes:

  • super.

  • super()

  • this()

  • this.

  • method()

Explicação

Questão 9 de 70

1

If you want to call different constructor of current class you would use...

Selecione uma das seguintes:

  • this()

  • this.

  • super()

  • super.

  • current.

Explicação

Questão 10 de 70

1

If there is at least one abstract method in a class, that class is called...

Selecione uma das seguintes:

  • Abstract class

  • General class

  • Recursive class

  • Tired class

  • Vanish class

Explicação

Questão 11 de 70

1

If there are no abstract methods in the class we call that class…

Selecione uma das seguintes:

  • Abstract class

  • Actual class

  • Super class

  • Non Abstract class

  • Funny class

Explicação

Questão 12 de 70

1

Which part is accessible to user ?

Selecione uma das seguintes:

  • Public

  • Private

  • Protected

  • Social

  • Interactive

Explicação

Questão 13 de 70

1

Is it possible to inherit from multiple classes?

Selecione uma das seguintes:

  • Yes

  • No

Explicação

Questão 14 de 70

1

Is it possible to implement multiple interfaces?

Selecione uma das seguintes:

  • Yes

  • No

Explicação

Questão 15 de 70

1

Every class has _____as a superclass

Selecione uma das seguintes:

  • Object

  • JAVA

  • Subject

  • Main

  • String

Explicação

Questão 16 de 70

1

This method returns a string that textually represents an object

Selecione uma das seguintes:

  • toString()

  • equals()

  • toText()

  • toGo()

  • hashCode()

Explicação

Questão 17 de 70

1

InstanceOf used to test ...

Selecione uma das seguintes:

  • Whether an object belongs to class or not

  • Whether object is object or not

  • Whether object plays football or not

  • Whether object has parent or not

  • Whether is the biggest object or not

Explicação

Questão 18 de 70

1

What is not perfect in this code: ave = sum/count;

Selecione uma das seguintes:

  • Division by zero may occur

  • Multiplication by 1000000 is impossible in JAVA

  • Semicolon needed after =

  • ave should be written as average

  • It is not JAVA code

Explicação

Questão 19 de 70

1

Attempt to convert a string that is not numeric to a number faults …

Selecione uma das seguintes:

  • NumberFormatException

  • ArithmeticException

  • SDP4IsNotASubjectException

  • DoNotSpeakException

  • SadProgrammerException

Explicação

Questão 20 de 70

1

Attempt to access array element using index less than zero folds

Selecione uma das seguintes:

  • ArrayIndexOutOfBoundsException

  • ArithmeticException

  • GoHomeExpception

  • InputMismatchException

  • McDonerException

Explicação

Questão 21 de 70

1

________ exception is an error normally due to programmer

Selecione uma das seguintes:

  • checked

  • unchecked

  • broken

  • cracked

Explicação

Questão 22 de 70

1

________ exception is an error normally not due to programmer

Selecione uma das seguintes:

  • checked

  • unchecked

  • hacked

  • frozen

  • cracked

Explicação

Questão 23 de 70

1

Which part is not accessible to user ?

Selecione uma das seguintes:

  • private

  • shifted

  • controlled

  • based

  • public

Explicação

Questão 24 de 70

1

How to handle exceptions?

Selecione uma das seguintes:

  • try{} catch(){}

  • try{} batch(){}

  • poimai{}menya{}esli{}smozhesh{}

  • fly{}catch(){}

  • go{}home(){}

Explicação

Questão 25 de 70

1

Which of the following is not example of visibility in Java ?

Selecione uma das seguintes:

  • private

  • public

  • protected

  • package

  • eclipsed

Explicação

Questão 26 de 70

1

Returns the reference to the element at position index

Selecione uma das seguintes:

  • get(index)

  • set(index)

  • has(index)

  • goTo(index)

  • fly(index)

Explicação

Questão 27 de 70

1

Get the size of ArrayList

Selecione uma das seguintes:

  • size()

  • size(list)

  • sizeOf()

  • length

  • length(list)

Explicação

Questão 28 de 70

1

Sets the element on position Index to reference entry

Selecione uma das seguintes:

  • set(index, entry)

  • setTo(index, entry)

  • index.set(entry)

  • entry.set(index)

  • set.index(entry)

Explicação

Questão 29 de 70

1

Public xxx(int index){
return theData[index];
}
this behavior is similar to which method of ArrayList class?

Selecione uma das seguintes:

  • get

  • set

  • size

  • equals

Explicação

Questão 30 de 70

1

What is the time complexity of insert(index) method in ArrayList

Selecione uma das seguintes:

  • O(n)

  • O(1)

  • O(logn)

  • O(n^2)

  • O(m*n)

Explicação

Questão 31 de 70

1

What is the difference between ArrayList and Vector?

Selecione uma das seguintes:

  • Vector is synchronized, where ArrayList is not

  • Vector is scalable, where ArrayList is not

  • Vector is flexible, where ArrayList is not

  • Vector is resizable, where ArrayList is not

  • There is no difference

Explicação

Questão 32 de 70

1

for(int i = 0; i < size; i++) {
If(theData[i] == entry) {
Return i;
}
Return -1;
}
This method is similar to which method of ArrayList

Selecione uma das seguintes:

  • indexOf(entry)

  • get(entry)

  • set(entry)

Explicação

Questão 33 de 70

1

Indicate constant time complexity in terms of Big-O notation

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(n^2)

  • O(const)

  • O(logn)

Explicação

Questão 34 de 70

1

The collection of abstract methods is called ...

Selecione uma das seguintes:

  • Interface

  • Abstract class

  • Class

  • Method

  • Function

Explicação

Questão 35 de 70

1

Indicate logarithm time complexity in terms of big-O notation?

Selecione uma das seguintes:

  • O(logn)

  • O(n^2)

  • O(n)

  • O(1)

  • O(done)

Explicação

Questão 36 de 70

1

Indicate linear time complexity in terms of big-O notation?

Selecione uma das seguintes:

  • O(n)

  • O(n^2)

  • O(n^3)

  • O(logn)

  • O(loglogn)

Explicação

Questão 37 de 70

1

Indicate exponential time complexity in terms of big-O notation?

Selecione uma das seguintes:

  • O(2^n)

  • O(n^2)

  • O(logn)

  • O(n)

  • O(n^4)

Explicação

Questão 38 de 70

1

Find the slowest time

Selecione uma das seguintes:

  • O(n!)

  • O(2^n)

  • O(n)

  • O(n^4)

  • O(100)

Explicação

Questão 39 de 70

1

What is the time complexity of ArrayList remove(index) method

Selecione uma das seguintes:

  • O(n)

  • O(1)

  • O(n * n)

  • O(logn)

  • O(n^3)

Explicação

Questão 40 de 70

1

What is the time complexity of adding an item in front of a LinkedList

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(n^2)

  • O(n^3)

  • O(nlogn)

Explicação

Questão 41 de 70

1

What is the time complexity of adding element in the beginning of ArrayList

Selecione uma das seguintes:

  • O(n)

  • O(1)

  • O(logn)

  • O(nlogn)

  • O(n^2)

Explicação

Questão 42 de 70

1

Which method searches for target and returns its position in LinkedList?

Selecione uma das seguintes:

  • indexOf(target)

  • get(target)

  • set(target)

  • equal(target)

Explicação

Questão 43 de 70

1

Indicate polynomial time complexity

Selecione uma das seguintes:

  • O(n^const) (const = 2,3…)

  • O(nlogn)

  • O(logn)

  • O(2^n)

  • O(1)

Explicação

Questão 44 de 70

1

How to remove item from LinkedList?

Selecione uma das seguintes:

  • Change Link of previous item to next item of item to be removed

  • Change Link of next item to previous item of item to be removed

  • Change Link of removing item to next

  • Change Link of removing item to previous

  • Go home and cry

Explicação

Questão 45 de 70

1

What is attribute of CircularList

Selecione uma das seguintes:

  • Next of last item referencing to the first item

  • Next of first item referencing to the last item

  • Prev of last item referencing to the last item

  • Next of best item referencing to the worst item

  • I need to go home and prepare this

Explicação

Questão 46 de 70

1

Which of the following in Java is very similar to “contract” ?

Selecione uma das seguintes:

  • Interface implementation

  • Class inheritance

  • Method overloading

  • Class overriding

Explicação

Questão 47 de 70

1

List iterator and iterator is the same thing in JAVA

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 48 de 70

1

Is it possible to traverse containing of a list this way?
for(int nextInt : aList) {… }

Selecione uma das seguintes:

  • Yes

  • No

  • May be

  • I don't know

Explicação

Questão 49 de 70

1

Show the method which exists in a DoubleLinkedList and not exist in a SingleLinkedList

Selecione uma das seguintes:

  • constructor

  • next()

  • hasNext()

  • previous()

  • hasBefore()

Explicação

Questão 50 de 70

1

What relationship class Node and LinkedList have?

Selecione uma das seguintes:

  • is-a

  • has-a

  • Is-b

  • to-c

  • They are couple

Explicação

Questão 51 de 70

1

Which of them is NOT an example of Data Structure ?

Selecione uma das seguintes:

  • Breadth First Search

  • ArrayList

  • Graph

  • Priority Queue

  • Set

Explicação

Questão 52 de 70

1

Which of them is NOT feature of collection interface ?

Selecione uma das seguintes:

  • Graph

  • Set

  • List

  • Queue

  • Vector

Explicação

Questão 53 de 70

1

This returns TRUE if the collection contains object

Selecione uma das seguintes:

  • contains(obj)

  • IndexOf(obj)

  • IndexF(obj)

  • find(obj)

  • goTo(obj)

Explicação

Questão 54 de 70

1

Elements of a List are accessed by means of an

Selecione uma das seguintes:

  • index

  • switch

  • position

  • loop

  • book

Explicação

Questão 55 de 70

1

A list can ___ or ___ as items(elements) are added or removed

Selecione uma das seguintes:

  • grow, shrink

  • flow, shrink

  • increase, grow

  • decrease, think

  • fly, sit

Explicação

Questão 56 de 70

1

OOP stands for?

Selecione uma das seguintes:

  • Object oriented programming

  • Obstacle oriented programming

  • Object oriented playing

  • Omar oriented programming

Explicação

Questão 57 de 70

1

The Collection is a _____ of a List ?

Selecione uma das seguintes:

  • superinterface

  • parent

  • interface

  • father

  • node

Explicação

Questão 58 de 70

1

Which method returns an object at the top of a Stack in JAVA?

Selecione uma das seguintes:

  • pop()

  • peek()

  • front()

  • poll()

  • top()

Explicação

Questão 59 de 70

1

Which method adds an item on the top of a Stack in JAVA?

Selecione uma das seguintes:

  • push()

  • add()

  • peek()

  • top()

  • bush()

Explicação

Questão 60 de 70

1

First in last out structure is ...

Selecione uma das seguintes:

  • Stack

  • Queue

  • Graph

  • Set

  • Tree

Explicação

Questão 61 de 70

1

Which structure is widely used in finding palindrome?

Selecione uma das seguintes:

  • Stack

  • Queue

  • Set

  • Map

  • Graph

Explicação

Questão 62 de 70

1

Which structure is widely used to calculate the value of postfix expression?

Selecione uma das seguintes:

  • Queue

  • Stack

  • Set

  • Graph

  • List

Explicação

Questão 63 de 70

1

Calculate value of “4 7 * 20-“

Selecione uma das seguintes:

  • 8

  • 1

  • 136

  • 144

  • 3

Explicação

Questão 64 de 70

1

Ability of object of one class to act like it is an object of another class

Selecione uma das seguintes:

  • Polymorphism

  • Encapsulation

  • Inheritance

  • Java code

  • SLOC(Source Line Of Code)

Explicação

Questão 65 de 70

1

What does method empty return for empty stack?

Selecione uma das seguintes:

  • True

  • False

  • Nothing

  • Empty

  • Hello

Explicação

Questão 66 de 70

1

Waiting line of people is similar to which data structure?

Selecione uma das seguintes:

  • Queue

  • Stack

  • Tree

  • Graph

  • LinkedList

Explicação

Questão 67 de 70

1

If we call remove() function for the queue, which item will be removed

Selecione uma das seguintes:

  • first

  • last

  • middle

  • second

  • third

Explicação

Questão 68 de 70

1

Which function return first added item in the queue?

Selecione uma das seguintes:

  • front()

  • first()

  • element()

  • goBack()

  • giveMeFirst()

Explicação

Questão 69 de 70

1

Which function is used to add new item in the queue?

Selecione uma das seguintes:

  • offer()

  • suffer()

  • add()

  • poll()

  • remove()

Explicação

Questão 70 de 70

1

First-in first-out data structure ...

Selecione uma das seguintes:

  • Queue

  • Stack

  • Set

  • Graph

  • List

Explicação