Lesson 1.2: Abstract Data Types and System Defined Data Types Flashcards
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?
False
An abstract class in Java can have instances. True or False?
False
Which keyword in Java is used to inherit a class?
Extends
What are basic types of data, e.g. byte, short, int, long, float, double, boolean, char. called?
Primitive data types
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?
Reference types
Integer arrays are primitive data types. True or False?
False
Which of the following is not a primitive data type in Java?
byte, integer, char, String
String
Are basically instances of Java classes. In simpler terms, these are variables of abstract data types.
Objects
Objects in Java are instances of classes. True or False?
True
A __________ defines a certain domain of value and defines Operations allowed on those values.
Data type
A data type that is not specified in the language itself but is specified by the user. (Ex. Structure, union and enumeration)
User defined data types
User defined data types which defines operations on values using functions without specifying what is there inside the function and how operations are performed.
Abstract data types
The program which uses data structure.
Client
The program that implements the data structure.
Implementation
Advantages of ADT:
- 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.