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
Examen

COMPUTER PROGRAMMING EXAM QUESTIONS AND ANSWERS 2025

Puntuación
-
Vendido
-
Páginas
38
Grado
A+
Subido en
22-05-2025
Escrito en
2024/2025

COMPUTER PROGRAMMING EXAM QUESTIONS AND ANSWERS 2025

Institución
COMPUTER PROGRAMMING
Grado
COMPUTER PROGRAMMING

Vista previa del contenido

COMPUTER LATEST
PROGRAMMING EXAM
ANSWER ALL QUESTIONS IN THIS SECTION



QUESTION 1



Which of the following is correct?



A) a parent class is a subclass of its child

B) a base class is a child class or derived class

C) a base class is a parent class or super class

D) a child class is a super class of its parent

E) None of these are correct - ANSWERS-C



QUESTION 2



An int array stores the following values: 9, 4, 12, 2, 6, 8,



Which of the following lists of numbers would accurately show the array after the
third pass of

the selection sort algorithm?



END OF
PAGE
1

, COMPUTER LATEST
PROGRAMMING EXAM
A) 9, 4, 12, 2, 6, 8, 18

B) 2, 4, 6, 9, 8, 12, 18

C) 2, 4, 12, 9, 6, 8, 18

D) 2, 4, 6, 9, 12, 8, 18

E) 2, 4, 9, 12, 6, 8, 18 - ANSWERS-D



QUESTION 3



Polymorphism is achieved by



A) overloading

B) overriding

C) embedding

D) abstraction

E) encapsulation - ANSWERS-B




END OF
PAGE
2

, COMPUTER LATEST
PROGRAMMING EXAM
QUESTION 4



Assume that Student, Employee and Retired are all extended classes of Person, and
all

four classes have different implementations of the method getMoney. Consider the
following code

where . . . indicates the required parameters for the constructors:



Person p = new Person(...);

int m1 = p.getMoney();

p = new Student(...);

int m2 = p.getMoney();

if (m2 < 100000) p = new Employee(...);

else if (m1 > 50000) p = new Retired(...);

int m3 = p.getMoney(); // assignment 3

The reference to getMoney() in assignment 3 is to the class



A) Person

B) Student

C) Employee

END OF
PAGE
3

, COMPUTER LATEST
PROGRAMMING EXAM
D) Retired

E) This cannot be determined by

examining the code - ANSWERS-E



QUESTION 6



What class hierarchy involving classes L, M, and N would make the following
code valid?



L l; M m; N n;

l = new M(); l = new N(); m = new N();



A) Classes M and N must both be subclasses of class L.

B) Class M must be a subclass of class N, which is a subclass of class L.

C) Class N must be a subclass of class M, which is a subclass of class L.

D) Classes L must be a subclass of class M and also a subclass of class N.

E) There is no class hierarchy that would allow this code. - ANSWERS-C




END OF
PAGE
4

Escuela, estudio y materia

Institución
COMPUTER PROGRAMMING
Grado
COMPUTER PROGRAMMING

Información del documento

Subido en
22 de mayo de 2025
Número de páginas
38
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.49
Accede al documento completo:

¿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

Conoce al vendedor

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.
Teacher101 Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
490
Miembro desde
2 año
Número de seguidores
74
Documentos
10805
Última venta
18 horas hace

Quality is my middle name.....100% ...my policy is to create and nurture people of quality by continuous education and training.....i guaranteed good grades 100% Feel free to get in touch through inbox...anything regarding help or issue with the exams posted... Finally after purchase please leave a good rating if satisfied with my work.... All the best as we continue working to improve ourselves through education

4.6

276 reseñas

5
224
4
15
3
26
2
3
1
8

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