CMSC 132 exam 1(Correct answers)
abstraction correct answers a technique in which we provide a very high-level model of activity or data. Small details about the model's functionality are not specifies to the user. procedural abstraction correct answers in which the user is aware of what actions are being performed but they are not told how the action is performed. data abstraction correct answers in which various data objects are known to the user, but how they are represented or implemented is not known to the user. abstract data type (ADT) correct answers is an entity that has values and operations. An abstract data type is an implementation of interfaces (a set of methods) encapsulation correct answers -hiding implementation details while providing an interface for data access. -allows you to use code without having to know or understand its implementation -can make changes to code without the user being able to tell a difference interfaces correct answers - allows us to express an abstract data type (what is should do not how) - defines an is-a relationship -public class x implements y (x is a y) classes correct answers -instances of objects -implement an interface -extend other classes Subclasses correct answers these subclasses inherit functions from the original class, and this also defines an "is-a" relationship. Java collections framework correct answers is a set of methods and classes that provide support for collections, which are objects that group multiple elements into one unit. There is a collection interface that defines a set of methods that certain class must have. It turns out that ArrayList is in the collections framework, and it implements the set of required methods. Iterable interface correct answers defines a method called iterator, which returns an iterator that allows us to traverse a container. -IteratorT iterator() abstract classes correct answers -a child class inherits all of the methods from the parent class - is -a relationship -ex. student is a person but a person is not a student
Información del documento
- Subido en
- 29 de mayo de 2024
- Número de páginas
- 4
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas