• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 16 páginas
Examen

CS 3330 Final || with Complete Solutions.

Document preview thumbnail
Vista previa 3 fuera de 16 páginas

CS 3330 Final || with Complete Solutions.

Vista previa del contenido

CS 3330 Final || with Complete Solutions.
object correct answers software bundle of 2 related characteristics: state and behavior

- an *instance* of a class
- has a state in which all of its properties have values

fields correct answers stores *states*

methods correct answers exposes state's *behavior*

serve as primary mechanism for object-to-object communication

modularity correct answers code written and maintained independently

information-hiding correct answers details of internal implementation remain hidden from
outside world

code re-use correct answers if object already exists, you can use that object in your program

- allows specialists to implement/test/debug complex, task-specific objects to run in your own
code

Pluggability and debugging ease correct answers if object is problematic, can remove from your
app and plug in a different object as replacement

class correct answers blueprint from which individual objects are created = a template for object

- defines object properties including a valid range of values and default value
- describes object behavior

instance correct answers bicycle is an instance of the class of objects known as bicycles

EX: class Bicycle { ... }
class BicycleDemo {
main() {
// bicycle objects
Bicycle bike1 = new Bicycle();
// invoke methods
bike1.speedUp(10);
}
}

access level modifiers correct answers determine whether other classes can use a particular field
or invoke a method

,top level access modifiers correct answers 1. *public*
2. *package-private* (no explicit modifier)

member level access modifiers correct answers 1. *public*
2. *private*
3. *protected*
4. *package-private* (no explicit modifier)

public access modifier correct answers class is visible to all classes everywhere

- class
- package
- subclass
- world

protected access modifier correct answers member can only be accessed within its own package

- class
- package
- subclass

no modifier (package-private) access modifier correct answers visible only within its own
package

- class
- package

private access modifier correct answers member can only be accessed within its OWN class and
CANNOT be overridden

- class

enum types correct answers special data type that enables for a variable to be a set of predefined
constants
- in all uppercase letters

EX: MAX_WIDTH, NORTH

this keyword correct answers reference to the current object (object whose method or constructor
is being called)
- used to resolve conflicts between method parameters and instance fields/methods of the
invoked class commonly used in Java

EX:
public Point(int x, int y) {
this.x = x;

, this.y = y;
}

steps to creating an object correct answers 1. *declaration* of a new object: type and variable
name
2. *initialization*: set the values
3. *installation*: new object name and returns new address to memory location

A method in a class declared as ______ can only access ______ class members.

public, public
static, static
public, protected
static, instance
instance, static
private, public
private, private correct answers static, static

- *static method* can only access static variables

Which of the following statements is correct?

All of the statements either produce compile errors or runtime errors
Integer.parseInt(100);
Integer.parseInt(100, 16);
Integer.parseInt("12", 2);
Integer.parseInt("345", 8);
All of the statements are correct correct answers Integer.parseInt("345", 8);

parseInt(String s, int radix) OR parseInt(String s)

Which of the following statements is true?

Overloading a method is to provide more than one method with the same name but with different
signatures to distinguish them.

To override a method, the method must be defined in the subclass using the same signature and
compatible return type as in its superclass.

If a method defined in a subclass is private that has the same method signature and return type as
in its superclass which is also private, the two methods are completely unrelated.

It is a compilation error if two methods differ only in return type in the same class.

None of the answers are true

Información del documento

Subido en
13 de junio de 2026
Número de páginas
16
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.19

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
SirAnton
3.7
(118)
Vendido
810
Seguidores
438
Artículos
40067
Última venta
1 semana hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes