Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 56 páginas
Examen

CSCI 2010 – Quiz 1 | Practice Questions, Answers & Study Guide

Document preview thumbnail
Vista previa 4 fuera de 56 páginas

Prepare for CSCI 2010 Quiz 1 with practice questions, answers, study materials, and exam review covering essential computer science concepts.

Vista previa del contenido

CSCI 2010 - Quiz 1 2026.




Only one constructor may be defined per class. False


What is a method? A member of a class that defines an operation on an object.


A classed called Printer has a method called printPage(4);
printDocument. This calls a void method in the Printer
class called printPage that takes an integer
representing the page number as an argument. How
should printDocument call printPage with an argument
of 4?


Given a class called Rectangle with a constructor that Rectangle rect = new Rectangle(8.2, 3.5);
takes two doubles as arguments representing the
dimensions, which of the following is the correct way
to invoke that constructor?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 1 2026.




Consider the following code: emp1 refers to the object with the name Anna Karenina. emp2 refers to the
same object.
Employee emp1 = new Employee();
emp1.setName("Anna Karenina");
Employee emp2 = new Employee();
emp2.setName("David Copperfield"):
emp2 = emp1;


Which of the following best describes the contents of
the two variables emp1 and emp2 after this code has
executed?


Given the following method header: public double computeArea(double length)


public double computeArea(double length, double
width)


Which of the following would be a legal overloaded
method in the same class?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 1 2026.




When calling a method from another method in the True
same class, the form methodName() is equivalent to
this.methodName().


Regular methods may be overloaded, but a False
constructor may not be overloaded.


All methods must return a value. False


What is the difference between a static variable and A static variable is shared by all objects of a class. Every object has its own
an instance variable? version of an instance variable.


What is decompostion? A design strategy that breaks a task down into several subtasks.


What is the difference between an accessor method An accessor method returns data contained in an instance variable. A mutator
(or getter) and a mutator method (or setter)? method modifies data contained in an instance variable.




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

, CSCI 2010 - Quiz 3 2026.




How is the inheritance relationship represented in a By an arrow pointing from the derived class to the base class.
UML diagram?


Assume that Mammal is a subclass of Animal and Dog dog = animal;
is a subclass of Mammal.


Given the following declarations:


Animal animal;
Mammal mammal;
Dog dog;


Which of the following statements is not legal?




3/21/2026, 8:55:01 PM 3/21/2026, 8:55:03 PM 3/21/2026, 8:54:57 PM

Información del documento

Subido en
19 de agosto de 2026
Número de páginas
56
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$10.99

¿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.
aplusgrade0
4.5
(2)
Vendido
1757
Seguidores
2
Artículos
527
Última venta
9 horas 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