• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 3 van de 17 pagina's
Tentamen (uitwerkingen)

COMP 1231 Final Question and answers correctly solved 2025

Document preview thumbnail
Voorbeeld 3 van de 17 pagina's

COMP 1231 Final Question and answers correctly solved 2025 is-a relationship - correct answer One object is type of another. has-a relationship - correct answer One object has reference to another. superclass, parent class, base class - correct answer The original class that is used to derive a new class using inheritance. child class, subclass - correct answer A class that is derived from another class. super - correct answer Used to refer to the parent class in a child class. Often used to invoke the parent's constructor (not inherited). access control modifiers - correct answer Keywords that are added to definitions to control access to them. default/no modifier - correct answer access control modifier - visible to the package private modifier - correct answer access control modifier - visible to the class only public modifier - correct answer access control modifier - visible to the world

Voorbeeld van de inhoud

COMP 1231 Final Question and
answers correctly solved 2025
is-a relationship - correct answer ✔One object is type of another.


has-a relationship - correct answer ✔One object has reference to another.


superclass, parent class, base class - correct answer ✔The original class
that is used to derive a new class using inheritance.


child class, subclass - correct answer ✔A class that is derived from another
class.


super - correct answer ✔Used to refer to the parent class in a child class.
Often used to invoke the parent's constructor (not inherited).


access control modifiers - correct answer ✔Keywords that are added to
definitions to control access to them.


default/no modifier - correct answer ✔access control modifier - visible to the
package


private modifier - correct answer ✔access control modifier - visible to the
class only


public modifier - correct answer ✔access control modifier - visible to the
world

,protected modifier - correct answer ✔access control modifier - visible to the
package and all subclasses - shown with a # symbol preceding them in UML
diagrams


static variable - correct answer ✔A variable that exists independently of any
instances created for the class. Only one copy of the variable exists
regardless of the number of instances of the class.


static method - correct answer ✔A method that exists independently of any
instances created for the class.


final variable - correct answer ✔A variable that cannot be modified once
initialized.


final method - correct answer ✔A method that cannot be overridden by any
subclasses.


final class - correct answer ✔A class that cannot be inherited.


abstract class - correct answer ✔A class that can never be instantiated. Its
sole purpose is to be extended. Does not need to contain abstract methods.
The child of an abstract class must override the abstract methods of the
parent, or it too will be considered abstract.


abstract method - correct answer ✔A method declared without any
implementation. The implementation is provided by the subclass.


object class - correct answer ✔All Java classes are subclasses of this class.
Defined in the java.lang package of the Java standard class library.

, String toString() - correct answer ✔This method is defined in the Object class
to return a string representation of the object. We often override this to provide
important information when printing an object.


boolean equals (Object obj) - correct answer ✔This method is defined in the
Object class to return true if this object is an alias of the specified object.


Object clone () - correct answer ✔This method is defined in the Object class
to return a copy of this object.


extends - correct answer ✔Used to establish an inheritance relationship.


mutator method - correct answer ✔Used to modify an existing variable.


accessor method - correct answer ✔Used to access an existing variable


overriding methods - correct answer ✔A child class can override the
definition of an inherited method in favor of its own. The new method must
have the same signature as the parent's method, but can have a different
body. The type of object executing the method determines which version of
the method is invoked.


shadowing variables - correct answer ✔overriding a variable - generally
should avoid doing this


overloading - correct answer ✔Deals with multiple methods with the same
name in the same class, but with different signatures. Lets you define a similar
operation in different ways for different parameters.

Documentinformatie

Geüpload op
13 augustus 2025
Aantal pagina's
17
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
$17.49

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kan je een ander document kiezen. Je kan het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
LEWISSHAWN55
3.1
(12)
Verkocht
97
Volgers
46
Items
7467
Laatst verkocht
3 maanden geleden




Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen