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

Algonquin College CST 8284/ CST8284 Final Exam, Questions and Answers Latest Updated 2025/26.

Puntuación
-
Vendido
-
Páginas
9
Grado
A+
Subido en
10-04-2026
Escrito en
2024/2025

Algonquin College CST 8284/ CST8284 Final Exam, Questions and Answers Latest Updated 2025/26. Take Test: CST8284_Final_Exam Q U E S T I O N 1 1. Which one of the following keywords causes a program to exit inside a loop, and continue execution after the end of the loop? a. continue b. goto c. break d. while e. none of the above 1 points Q U E S T I O N 2 1. @Override has the effect of a. checking that the method following @Override has an identical method in the superclass b. checking that the spelling of the subclass method identifier is correct c. checking that the identifier of the method that follow @Override is identical to an identifier in the subclass d. checking that the subclass method following @Override has the same parameter list as a method in the superclass e. forcing methods in the superclass to be overridden by methods in the subclass 1 points Q U E S T I O N 3 1. When two methods have the same name but different signatures, they are said to be a. overridden b. static c. overloaded d. chained e. recursive 1 points Q U E S T I O N 4 1. Which one of the following is not true of the relationship between an interface and an abstract class: a. an interface acts like an abstract class that must contain only abstract methods b. an interface, like an abstract class, cannot be instantiatedc. an interface acts just like an abstract class except that there are no restrictions on the number of interfaces a class may implement d. unlike an abstract class, an interface cannot be used as a parameter type in an argument list e. none of the above 1 points Q U E S T I O N 5 1. In debug mode, which one of the following allows you to resume execution in debug || 1 points Q U E S T I O N 6 1. True or False: a concrete class that implements a marker interface will not need to override any methods True False 1 points Q U E S T I O N 7 1. In file IO, the term 'output' means that information is input into a file from a program True False 1 points Q U E S T I O N 8 1. True or False: a lambda expression can only be used with a class that contains a single method True False 1 points Q U E S T I O N 9 1. Assume each of the following classes are correctly defined in appropriatelynamed files in the same package: public class MySuperClass { private int x; public int getX(){return x;} public void setX(int x){this.x = x;} public int getTwiceAsMuch(){return 2*x;} } public class MySubClass extends MySuperClass { public MySubClass(){setX(2);} // …assume other subclass methods go here } public class TestSubClass { public static void main (String[] args){ MySubClass msc = new MySubClass(); int Y = getX()/2;X(Y); } } When main() has finished executing, the result stored in the x variable will be a. 0 b. 1 c. 2 d. 4 e. none of the above 1 points Q U E S T I O N 1 0 1. While one of the flowing is used in UML diagrams to signal that a member is static? a. italics b. CAPITALIZE c. underline d. boldface e. in guimettes 1 points Q U E S T I O N 1 1 1. The third (or last) compartment of a UML diagram is used to indicate the class's methods True False 1 points Q U E S T I O N 1 2 1. Which one of the following symbols would be used to indicate that one class has many other classes (i.e. a 'has a' relationship involving one-to-many classes) aggregation 1 points Q U E S T I O N 1 3 1. True or False: Mutable variables can potentially lead to deadlock True False 1 points Q U E S T I O N 1 41. Which one of the following symbols would be used to indicate inheritance between two objects, i.e. an 'is a' relationship inheritance 1 points Q U E S T I O N 1 5 1. True or False: The File class contains methods that allow the user to add or delete items stored inside a file that is saved on, for example, a hard drive or USB drive True False 1 points Q U E S T I O N 1 6 1. Which one of the following is not a characteristic of a method’s signature a. the order of the parameters b. the number of parameters c. the type of each parameter d. the identifiers used in the parameters e. none of the above 1 points QUES TION 17 1. Assume that Classroom and Room are two classes related by inheritance. Given what you know about the relationship between classes and subclasses, which one of the following two declarations is most likely to be correct? public class Room extends Classroom (Select True) public class Classroom extends Room (Select False) True False 1 points Q U E S T I O N 1 8 1. The code: for(::) {} when executed, a. triggers a run-time exception b. triggers a compile-time exception c. flags a warning d. does not execute anything inside the { } e. is an infinite loop; it runs forever 1 points Q U E S T I O N 1 9 1. To refactor a class, package, or project means toa. leave the original code untouched, but add new features b. improve the readability of the code c. rename identifiers in the code d. correct existing errors in the functionality of a program e. change the program in a way which does not affect its original functionality 1 points Q U E S T I O N 2 0 1. Which one of the following symbols is used to indicate that a method is protected in UML? a.&& b.@ c.+ d. - e. # 1 points Q U E S T I O N 2 1 1. Assume each of the following classes are correctly defined in appropriately-named files in the same package: public class MySuperClass { private int x; public int getX(){return x;} public void setX(int x){this.x = x;} public int getTwiceAsMuch(){return 2*x;} } public class MySubClass extends MySuperClass { public MySubClass(){setX(2);} // …assume other subclass methods go here } public class TestSubClass { public static void main (String[] args){ MySubClass msc = new MySubClass(); int Y = getX()/2; X(Y); } } In the code above, objects instantiated using MySubClass will NOT have access to the toString() method, since it doesn't appear in the superclass True False1 points Q U E S T I O N 2 2 1. If a method is declared without an access modifier, then, assuming it is in a public class, its visibility is limited to a. the current class b. the current package c. the current project d. inherited subclasses e. none of the above 1 points Q U E S T I O N 2 3 1. True or False: If you build an interface, you must declare each of its methods abstract True False static method 1 points Q U E S T I O N 2 4 1. Given the incrCounter() method whose header declaration is: public static void incrCounter(int newCtr) {...} which one of the following correctly show its representation in a UML class diagram? a. -incrCounter(newCtr: int): void b. -incrCounter(newCtr: int): void c. +incrCounter(newCtr: int): void d. +incrCounter(newCtr: int): void e. +incrCounter(newCtr: int): void 1 points Q U E S T I O N 2 5 1. While one of the flowing is used in UML diagrams to signal a comment? a. boldface b. CAPITALIZE c. italics d. in guimettes e. underline 1 points Q U E S T I O N 2 6 1. Which one of the following words is NOT used to indicate a relationship between objects? a. compositionb. agglutination c. association d. inheritance e. none of the above 1 points Q U E S T I O N 2 7 If you were in debug mode, which one of the following buttons allows you to resume regular execution outside of debug, in normal 'Java' mode? 1 points Q U E S T I O N 2 8 True or False: Every outer superclass must have a no-arg constructor if its subclass(es) are to be instantiated correctly True False 1 points Q U E S T I O N 2 9 Which one of the following symbols would be used to indicate that a simple binary association between two classes, typical of those found in a factory method?  1 points QUES TION 30 Which one of the following does not use a reference type in Java a. an array b. a class c. an interface d. a String e. none of the above 1 points QUES TION 31 Which one of the following best describes the reason for implementing an interface? Not sure a. an interface forces the programmer who uses the interface to implement the interface's methods b. implementing classes of an interface are guaranteed to make the interface's methods available to clients, thus ensuring a standard set of features c. code execution time is reduced by forcing the user of the interface to override the abstract methods in the first available subclassd. it leads to code reuse by ensuring that the interface's methods are implemented e. it allows the user to create an abstract hierarchy 1 points Q U E S T I O N 3 2 True or False: the parameters passed to a method are always passed on the stack, rather than on the heap True False 1 points Q U E S T I O N 3 3 True or False: the Object class is abstract True False 1 points Q U E S T I O N 3 4 In debug mode, which one of the following allows you to step into the code in a method 1 points Q U E S T I O N 3 5 Which one of the following does not describe an automatic process in Java, i.e. one which occurs without the programmer having to make any explicit conversion? Not sure a. automatic type conversion b. autoboxing c. implicit casting d. type inference e. none of the above 1 points QUES TION 36 While one of the flowing is used in UML diagrams to signal that a member is abstract? a. in guimettes b. CAPITALIZE c. boldface d. underline e. italics 1 points QUES TION 37 Which one of the following is NOT an advantage to using an inner class to handle mouse click events?a. it reduces the number of external, package-level classes that would otherwise be needed b. an inner class can be made private, thus limiting its use to just the outer class c. you do not need to override the handle() method with the code to be executed on a click event d. code is easier to maintain, since the affected Node (like a button) and its handler can all be located in the same class e. none of the above 1 points Q U E S T I O N 3 8 Given the declaration which one of the main features ('pillars') of OOP is responsible for allowing you to write code like: Not sure a. abstraction b. polymorphism c. inheritance d. generics e. encapsulation 1 points Q U E S T I O N 3 9 Which one of the following terms is used to describe any JavaFX object, whether graphical (i.e. it can be made visible on the screen) or not? Not sure a. Node b. Parent c. Control d. Icon e. ActionEvent 1 points Q U E S T I O N 4 0 True or False: Instantiated objects are stored on the heap True False 1 points

Mostrar más Leer menos
Institución
Grado

Vista previa del contenido

Take Test: CST8284_Final_Exam
QUESTION 1
1. Which one of the following keywords causes a program to exit inside a loop, and continue execution after the
end of the loop?

a. continue

b. goto

c. break

d. while

e. none of the above


1 points
QUESTION 2
1. @Override has the effect of
a. checking that the method following @Override has an identical method in the superclass
b. checking that the spelling of the subclass method identifier is correct

c. checking that the identifier of the method that follow @Override is identical to an identifier in the
subclass
d. checking that the subclass method following @Override has the same parameter list as a method in
the superclass
e. forcing methods in the superclass to be overridden by methods in the subclass


1 points
QUESTION 3
1. When two methods have the same name but different signatures, they are said to be
a. overridden

b. static

c. overloaded

d. chained

e. recursive


1 points
QUESTION 4
1. Which one of the following is not true of the relationship between an interface and an abstract class:
a. an interface acts like an abstract class that must contain only abstract methods

b. an interface, like an abstract class, cannot be instantiated

, c. an interface acts just like an abstract class except that there are no restrictions on the number of
interfaces a class may implement

d. unlike an abstract class, an interface cannot be used as a parameter type in an argument list

e. none of the above


1 points
QUESTION 5
1. In debug mode, which one of the following allows you to resume execution in debug
||>
1 points
QUESTION 6
1. True or False: a concrete class that implements a marker interface will not need to override any methods

True
False
1 points
QUESTION 7
1. In file IO, the term 'output' means that information is input into a file from a program
True
False
1 points
QUESTION 8
1. True or False: a lambda expression can only be used with a class that contains a single method

True
False
1 points
QUESTION 9
1. Assume each of the following classes are correctly defined in appropriately-
named files in the same package:
public class MySuperClass {
private int x;
public int getX(){return x;}
public void setX(int x){this.x = x;}
public int getTwiceAsMuch(){return 2*x;}
}

public class MySubClass extends MySuperClass {
public MySubClass(){setX(2);}
// …assume other subclass methods go here
}
public class TestSubClass {
public static void main (String[] args){
MySubClass msc = new MySubClass();
int Y = getX()/2;

Escuela, estudio y materia

Institución
Estudio
Grado

Información del documento

Subido en
10 de abril de 2026
Número de páginas
9
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$11.10
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.
elam17799 Brighton College
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
22
Miembro desde
1 año
Número de seguidores
1
Documentos
206
Última venta
1 semana hace
Explore thousands of course and professor reviews

Explore thousands of course and professor reviews from Canada Universities and Colleges students. Feel free to inbox me for any paper you wish to have.

3.7

3 reseñas

5
0
4
2
3
1
2
0
1
0

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