SPD

Beschreibung

Quiz am SPD, erstellt von Hanzo Conard am 24/05/2017.
Hanzo Conard
Quiz von Hanzo Conard, aktualisiert more than 1 year ago
Hanzo Conard
Erstellt von Hanzo Conard vor etwa 7 Jahre
369
0

Zusammenfassung der Ressource

Frage 1

Frage
What are two parts of ADT?
Antworten
  • Private and Public
  • ArrayList and Vector
  • Queue and Stack
  • Parent and Child
  • Int and float

Frage 2

Frage
Which of them has more methods?
Antworten
  • Superclass
  • Subclass

Frage 3

Frage
The relationship when one class is a subclass of another is called...
Antworten
  • is-a
  • has-a

Frage 4

Frage
The relationship when one class is defined inside the definition of another is called...
Antworten
  • has-a
  • is-a
  • is-b
  • has-b
  • to-c

Frage 5

Frage
Redefinition of method of superclass in a subclass with the same name and number of parameters is...
Antworten
  • Override
  • Overload
  • Overhead
  • Upperload
  • Overbeat

Frage 6

Frage
Redefinition of method with the same name but different number of parameters is called...
Antworten
  • Overload
  • Override
  • Overflow
  • Upperride
  • Download

Frage 7

Frage
If you want to call the constructor of superclass you would use....
Antworten
  • super.
  • super()
  • this.
  • this()
  • constructor()

Frage 8

Frage
If you want to call data member of superclass you would use...
Antworten
  • super.
  • super()
  • this()
  • this.
  • method()

Frage 9

Frage
If you want to call different constructor of current class you would use...
Antworten
  • this()
  • this.
  • super()
  • super.
  • current.

Frage 10

Frage
If there is at least one abstract method in a class, that class is called...
Antworten
  • Abstract class
  • General class
  • Recursive class
  • Tired class
  • Vanish class

Frage 11

Frage
If there are no abstract methods in the class we call that class…
Antworten
  • Abstract class
  • Actual class
  • Super class
  • Non Abstract class
  • Funny class

Frage 12

Frage
Which part is accessible to user ?
Antworten
  • Public
  • Private
  • Protected
  • Social
  • Interactive

Frage 13

Frage
Is it possible to inherit from multiple classes?
Antworten
  • Yes
  • No

Frage 14

Frage
Is it possible to implement multiple interfaces?
Antworten
  • Yes
  • No

Frage 15

Frage
Every class has _____as a superclass
Antworten
  • Object
  • JAVA
  • Subject
  • Main
  • String

Frage 16

Frage
This method returns a string that textually represents an object
Antworten
  • toString()
  • equals()
  • toText()
  • toGo()
  • hashCode()

Frage 17

Frage
InstanceOf used to test ...
Antworten
  • 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

Frage 18

Frage
What is not perfect in this code: ave = sum/count;
Antworten
  • 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

Frage 19

Frage
Attempt to convert a string that is not numeric to a number faults …
Antworten
  • NumberFormatException
  • ArithmeticException
  • SDP4IsNotASubjectException
  • DoNotSpeakException
  • SadProgrammerException

Frage 20

Frage
Attempt to access array element using index less than zero folds
Antworten
  • ArrayIndexOutOfBoundsException
  • ArithmeticException
  • GoHomeExpception
  • InputMismatchException
  • McDonerException

Frage 21

Frage
________ exception is an error normally due to programmer
Antworten
  • checked
  • unchecked
  • broken
  • cracked

Frage 22

Frage
________ exception is an error normally not due to programmer
Antworten
  • checked
  • unchecked
  • hacked
  • frozen
  • cracked

Frage 23

Frage
Which part is not accessible to user ?
Antworten
  • private
  • shifted
  • controlled
  • based
  • public

Frage 24

Frage
How to handle exceptions?
Antworten
  • try{} catch(){}
  • try{} batch(){}
  • poimai{}menya{}esli{}smozhesh{}
  • fly{}catch(){}
  • go{}home(){}

Frage 25

Frage
Which of the following is not example of visibility in Java ?
Antworten
  • private
  • public
  • protected
  • package
  • eclipsed

Frage 26

Frage
Returns the reference to the element at position index
Antworten
  • get(index)
  • set(index)
  • has(index)
  • goTo(index)
  • fly(index)

Frage 27

Frage
Get the size of ArrayList
Antworten
  • size()
  • size(list)
  • sizeOf()
  • length
  • length(list)

Frage 28

Frage
Sets the element on position Index to reference entry
Antworten
  • set(index, entry)
  • setTo(index, entry)
  • index.set(entry)
  • entry.set(index)
  • set.index(entry)

Frage 29

Frage
Public xxx(int index){ return theData[index]; } this behavior is similar to which method of ArrayList class?
Antworten
  • get
  • set
  • size
  • equals

Frage 30

Frage
What is the time complexity of insert(index) method in ArrayList
Antworten
  • O(n)
  • O(1)
  • O(logn)
  • O(n^2)
  • O(m*n)

Frage 31

Frage
What is the difference between ArrayList and Vector?
Antworten
  • 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

Frage 32

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

Frage 33

Frage
Indicate constant time complexity in terms of Big-O notation
Antworten
  • O(1)
  • O(n)
  • O(n^2)
  • O(const)
  • O(logn)

Frage 34

Frage
The collection of abstract methods is called ...
Antworten
  • Interface
  • Abstract class
  • Class
  • Method
  • Function

Frage 35

Frage
Indicate logarithm time complexity in terms of big-O notation?
Antworten
  • O(logn)
  • O(n^2)
  • O(n)
  • O(1)
  • O(done)

Frage 36

Frage
Indicate linear time complexity in terms of big-O notation?
Antworten
  • O(n)
  • O(n^2)
  • O(n^3)
  • O(logn)
  • O(loglogn)

Frage 37

Frage
Indicate exponential time complexity in terms of big-O notation?
Antworten
  • O(2^n)
  • O(n^2)
  • O(logn)
  • O(n)
  • O(n^4)

Frage 38

Frage
Find the slowest time
Antworten
  • O(n!)
  • O(2^n)
  • O(n)
  • O(n^4)
  • O(100)

Frage 39

Frage
What is the time complexity of ArrayList remove(index) method
Antworten
  • O(n)
  • O(1)
  • O(n * n)
  • O(logn)
  • O(n^3)

Frage 40

Frage
What is the time complexity of adding an item in front of a LinkedList
Antworten
  • O(1)
  • O(n)
  • O(n^2)
  • O(n^3)
  • O(nlogn)

Frage 41

Frage
What is the time complexity of adding element in the beginning of ArrayList
Antworten
  • O(n)
  • O(1)
  • O(logn)
  • O(nlogn)
  • O(n^2)

Frage 42

Frage
Which method searches for target and returns its position in LinkedList?
Antworten
  • indexOf(target)
  • get(target)
  • set(target)
  • equal(target)

Frage 43

Frage
Indicate polynomial time complexity
Antworten
  • O(n^const) (const = 2,3…)
  • O(nlogn)
  • O(logn)
  • O(2^n)
  • O(1)

Frage 44

Frage
How to remove item from LinkedList?
Antworten
  • 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

Frage 45

Frage
What is attribute of CircularList
Antworten
  • 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

Frage 46

Frage
Which of the following in Java is very similar to “contract” ?
Antworten
  • Interface implementation
  • Class inheritance
  • Method overloading
  • Class overriding

Frage 47

Frage
List iterator and iterator is the same thing in JAVA
Antworten
  • True
  • False

Frage 48

Frage
Is it possible to traverse containing of a list this way? for(int nextInt : aList) {… }
Antworten
  • Yes
  • No
  • May be
  • I don't know

Frage 49

Frage
Show the method which exists in a DoubleLinkedList and not exist in a SingleLinkedList
Antworten
  • constructor
  • next()
  • hasNext()
  • previous()
  • hasBefore()

Frage 50

Frage
What relationship class Node and LinkedList have?
Antworten
  • is-a
  • has-a
  • Is-b
  • to-c
  • They are couple

Frage 51

Frage
Which of them is NOT an example of Data Structure ?
Antworten
  • Breadth First Search
  • ArrayList
  • Graph
  • Priority Queue
  • Set

Frage 52

Frage
Which of them is NOT feature of collection interface ?
Antworten
  • Graph
  • Set
  • List
  • Queue
  • Vector

Frage 53

Frage
This returns TRUE if the collection contains object
Antworten
  • contains(obj)
  • IndexOf(obj)
  • IndexF(obj)
  • find(obj)
  • goTo(obj)

Frage 54

Frage
Elements of a List are accessed by means of an
Antworten
  • index
  • switch
  • position
  • loop
  • book

Frage 55

Frage
A list can ___ or ___ as items(elements) are added or removed
Antworten
  • grow, shrink
  • flow, shrink
  • increase, grow
  • decrease, think
  • fly, sit

Frage 56

Frage
OOP stands for?
Antworten
  • Object oriented programming
  • Obstacle oriented programming
  • Object oriented playing
  • Omar oriented programming

Frage 57

Frage
The Collection is a _____ of a List ?
Antworten
  • superinterface
  • parent
  • interface
  • father
  • node

Frage 58

Frage
Which method returns an object at the top of a Stack in JAVA?
Antworten
  • pop()
  • peek()
  • front()
  • poll()
  • top()

Frage 59

Frage
Which method adds an item on the top of a Stack in JAVA?
Antworten
  • push()
  • add()
  • peek()
  • top()
  • bush()

Frage 60

Frage
First in last out structure is ...
Antworten
  • Stack
  • Queue
  • Graph
  • Set
  • Tree

Frage 61

Frage
Which structure is widely used in finding palindrome?
Antworten
  • Stack
  • Queue
  • Set
  • Map
  • Graph

Frage 62

Frage
Which structure is widely used to calculate the value of postfix expression?
Antworten
  • Queue
  • Stack
  • Set
  • Graph
  • List

Frage 63

Frage
Calculate value of “4 7 * 20-“
Antworten
  • 8
  • 1
  • 136
  • 144
  • 3

Frage 64

Frage
Ability of object of one class to act like it is an object of another class
Antworten
  • Polymorphism
  • Encapsulation
  • Inheritance
  • Java code
  • SLOC(Source Line Of Code)

Frage 65

Frage
What does method empty return for empty stack?
Antworten
  • True
  • False
  • Nothing
  • Empty
  • Hello

Frage 66

Frage
Waiting line of people is similar to which data structure?
Antworten
  • Queue
  • Stack
  • Tree
  • Graph
  • LinkedList

Frage 67

Frage
If we call remove() function for the queue, which item will be removed
Antworten
  • first
  • last
  • middle
  • second
  • third

Frage 68

Frage
Which function return first added item in the queue?
Antworten
  • front()
  • first()
  • element()
  • goBack()
  • giveMeFirst()

Frage 69

Frage
Which function is used to add new item in the queue?
Antworten
  • offer()
  • suffer()
  • add()
  • poll()
  • remove()

Frage 70

Frage
First-in first-out data structure ...
Antworten
  • Queue
  • Stack
  • Set
  • Graph
  • List
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Translations and transformations of functions
Christine Laurich
AnS 352 Final Exam Vocab Review
michgreg
Psychology 306 Practice Final Quiz
pnguyen540
Anthropology Final-- Part 3-4
Heather McCord
Reading Quizes
Taylor Morris
Physio Quiz
Tina Truong
Microbiology MCQs 3rd Year Final- PMU
Med Student
Computer science quiz
Ryan Barton
Anatomy and Physiology
pressey_property
CCNA Security 210-260 IINS - Exam 1
Mike M
CCNA Security 210-260 IINS - Exam 2
Mike M