Lesson 1.2: Abstract Data Types and System Defined Data Types Flashcards

1
Q

A class in Java can implement more than one interface, but a particular interface cannot be implemented by more than one class. True or False?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

An abstract class in Java can have instances. True or False?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which keyword in Java is used to inherit a class?

A

Extends

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are basic types of data, e.g. byte, short, int, long, float, double, boolean, char. called?

A

Primitive data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are any instantiable class as well as arrays; they store addresses rather than values, e.g. String, Scanner, Random, Die, int[], String[], etc. called?

A

Reference types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integer arrays are primitive data types. True or False?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following is not a primitive data type in Java?
byte, integer, char, String

A

String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Are basically instances of Java classes. In simpler terms, these are variables of abstract data types.

A

Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Objects in Java are instances of classes. True or False?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A __________ defines a certain domain of value and defines Operations allowed on those values.

A

Data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A data type that is not specified in the language itself but is specified by the user. (Ex. Structure, union and enumeration)

A

User defined data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

User defined data types which defines operations on values using functions without specifying what is there inside the function and how operations are performed.

A

Abstract data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The program which uses data structure.

A

Client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The program that implements the data structure.

A

Implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Advantages of ADT:

A
  • Users can simply use operations without knowing its implementation.
  • Client program can still work the same way without being affected when changes are introduced from the implementation of the stack.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does ADT provide?

A

Abstraction. (hiding details from the user.)