Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Document preview thumbnail
Voorbeeld 4 van de 44 pagina's
Tentamen (uitwerkingen)

CSE 205 Final Updated Actual Exam Questions And Correct Answers |Graded A+|

Document preview thumbnail
Voorbeeld 4 van de 44 pagina's

CSE 205 Final Updated Actual Exam Questions And Correct Answers |Graded A+| Which of the following could be used to instantiate a new Student s1? a) new Student(s1); b) new Student s1 = ("Jane Doe", "Computer Science", 3.333, 33); c) Student s1 = new Student("Jane Doe", "Computer Science", 3.333, 33); d) Student s1 = new Student( ); e) s1 = new Student( ); - ANSWER -c) Student s1 = new Student("Jane Doe", "Computer Science", 3.333, 33); Consider a method defined with the header: public void foo(int a, int b). Which of the following method calls is legal? a) foo(0 / 1, 2 * 3); b) foo(0, 0.1); c) foo(0); d) foo(1 + 2, 3 * 0.1); e) foo( ); - ANSWER -a) foo(0 / 1, 2 * 3); Use the following partial class definitions: public class A1 { public int x; private int y; protected int z; ... } public class A2 extends A1 { protected int a; private int b; ... } public class A3 extends A2 { private int q; ... } Which of the following is true with respect to A1, A2 and A3? a) A2 and A3 are both subclasses of A1 b) A1 and A2 are both subclasses of A3 c) A1 is a subclass of A2 and A2 is a subclass of A3 d) A3 is a subclass of A2 and A2 is a subclass of A1 - ANSWER -d) A3 is a subclass of A2 and A2 is a subclass of A1 Use the following partial class definitions: public class A1 { public int x; private int y; protected int z; ... } public class A2 extends A1 { protected int a; private int b; ... } public class A3 extends A2 { private int q; ... } Which of the following lists of instance data are accessible in class A2? a) z, a, b b) x, y, z, a c) x, y, z, a, b d) a, b e) x, z, a, b - ANSWER -e) x, z, a, b Use the following partial class definitions: public class A1 { public int x; private int y; protected int z; ... } public class A2 extends A1 { protected int a; private int b; ... } public class A3 extends A2 { private int q; ... } Which of the following lists of instance data are accessible in A3? a) x, z, a, q b) x, y, z, a, b, q c) a, q d) x, a, q e) a, b, q - ANSWER -a) x, z, a, q

Voorbeeld van de inhoud

CSE 205 Final Updated Actual Exam
Questions And Correct Answers |Graded
A+|
Which of the following could be used to instantiate a new Student s1?

a) new Student(s1);
b) new Student s1 = ("Jane Doe", "Computer Science", 3.333, 33);
c) Student s1 = new Student("Jane Doe", "Computer Science", 3.333, 33);
d) Student s1 = new Student( );
e) s1 = new Student( ); - ANSWER -c) Student s1 = new Student("Jane Doe",
"Computer Science", 3.333, 33);

Consider a method defined with the header: public void foo(int a, int b). Which of
the following method calls is legal?
a) foo(, 2 * 3);
b) foo(0, 0.1);
c) foo(0);
d) foo(1 + 2, 3 * 0.1);
e) foo( ); - ANSWER -a) foo(, 2 * 3);

Use the following partial class definitions:
public class A1
{
public int x;
private int y;
protected int z;
...
}
public class A2 extends A1
{
protected int a;

, private int b;
...
}
public class A3 extends A2
{
private int q;
...
}
Which of the following is true with respect to A1, A2 and A3?

a) A2 and A3 are both subclasses of A1
b) A1 and A2 are both subclasses of A3
c) A1 is a subclass of A2 and A2 is a subclass of A3
d) A3 is a subclass of A2 and A2 is a subclass of A1 - ANSWER -d) A3 is a
subclass of A2 and A2 is a subclass of A1

Use the following partial class definitions:
public class A1
{
public int x;
private int y;
protected int z;
...
}
public class A2 extends A1
{
protected int a;
private int b;
...
}
public class A3 extends A2
{
private int q;
...
}

,Which of the following lists of instance data are accessible in class A2?

a) z, a, b
b) x, y, z, a
c) x, y, z, a, b
d) a, b
e) x, z, a, b - ANSWER -e) x, z, a, b

Use the following partial class definitions:
public class A1
{
public int x;
private int y;
protected int z;
...
}
public class A2 extends A1
{
protected int a;
private int b;
...
}
public class A3 extends A2
{
private int q;
...
}
Which of the following lists of instance data are accessible in A3?

a) x, z, a, q
b) x, y, z, a, b, q
c) a, q
d) x, a, q
e) a, b, q - ANSWER -a) x, z, a, q

, Use the following partial class definitions:
public class A1
{
public int x;
private int y;
protected int z;
...
}
public class A2 extends A1
{
protected int a;
private int b;
...
}
public class A3 extends A2
{
private int q;
...
}
Which of the following is true regarding the use of instance data y of class A1?

a) it is accessible in A1 and A2
b) it is accessible in A1, A2 and A3
c) it is accessible only in A3
d) it is accessible only in A1
e) it is not accessible to any of the three classes - ANSWER -d) it is accessible
only in A1

All classes in Java are directly or indirectly subclasses of the _______ class.

a) Object
b) this
c) Reference
d) String
e) Wrapper - ANSWER -a) Object

Documentinformatie

Geüpload op
2 mei 2026
Aantal pagina's
44
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
€14,61

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt 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.
TheExamMaestro
3,6
(18)
Verkocht
153
Volgers
5
Items
3727
Laatst verkocht
1 week geleden

Echte notities, van echte studenten
Elk document op Stuvia is geschreven door een medestudent die hetzelfde vak deed. Zo leer je van iemand die het al heeft gehaald.



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 iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus 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