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
Tentamen (uitwerkingen)

ITSC 1213 exam 1 & 2 Questions and Answers Already Passed

Beoordeling
-
Verkocht
-
Pagina's
14
Cijfer
A+
Geüpload op
15-06-2025
Geschreven in
2024/2025

ITSC 1213 exam 1 & 2 Questions and Answers Already Passed If you saw the following in a UML diagram, what does it mean? - myCounter : int - Answers This is a private int field If you saw the following in a UML diagram, what would it mean? + StudentRecord() - Answers A public constructor If you saw the following in a UML diagram, what would it mean?+ getRecord(int) : StudentRecord - Answers A public method that takes an int parameter and returns a StudentRecord object What is printed when the following code executes and x has been set to 3 and y has been set to 6? - Answers first case Given a 2d array arr[][], match items from the left to its corresponding answer on the right. - Answers The index of the last row -- h-1 The index of the item in the first row and first column. -- arr[0][0] The index of the item in the first row and second column. -- arr[0][1] The number of elements in an array. -- h * arr[0].length A student has created a Party class. The class contains variables to represent the following. An int variable called numOfPeople to represent the number of people at the party. A boolean variable called discoLightsOn to represent whether the disco ball is on. A boolean variable called partyStarted to represent whether the party has started. The object myParty is declared as type Party. Which of the following descriptions is accurate? - Answers myParty is an instance of the Party class. Which of the following is false about import statements? - Answers you must specify the class you are importing in the import statement Which will cause the shortest execution of a binary search looking for a value in an array of integers? - Answers The value is in the middle of the array What are some of the reasons you would use an enhanced for-each loop instead of a for loop? I: If you wish to access every element of an array. II: If you wish to modify elements of the array. III: If you wish to refer to elements through a variable name instead of an array index - Answers I and III only. Assume that nums in an instance field declared in a class private ArrayListInteger nums; and it has been created as an ArrayList object and it initially contains the following Integer values [0, 0, 4, 2, 5, 0, 3, 0]. If the same class has a method called numQuest defined as follows: // precondition: () 0; // nums contains Integer objects public void numQuest() { int k = 0; Integer zero = new Integer(0); while (k ()) { if ((k).equals(zero)) e(k); k++; } } What will nums contain as a result of executing numQuest? - Answers [0, 4, 2, 5, 3] What will print when the following code executes? ArrayListString list1 = new ArrayListString(); ("Anaya"); ("Layla"); ("Sharrie"); (1, "Destini"); (1, "Sarah"); Sln(list1); You can reference this table for a description of some of the ArrayList methods. The E type refers to the base type of the ArrayList: - Answers "Anaya", "Sarah", "Destini", "Sharrie" Given the following Date class public class Date { private int year; private int month;

Meer zien Lees minder
Instelling
ITSC 1213
Vak
ITSC 1213

Voorbeeld van de inhoud

ITSC 1213 exam 1 & 2 Questions and Answers Already Passed

If you saw the following in a UML diagram, what does it mean? - myCounter : int - Answers This is a
private int field

If you saw the following in a UML diagram, what would it mean? + StudentRecord() - Answers A public
constructor

If you saw the following in a UML diagram, what would it mean?+ getRecord(int) : StudentRecord -
Answers A public method that takes an int parameter and returns a StudentRecord object

What is printed when the following code executes and x has been set to 3 and y has been set to 6? -
Answers first case

Given a 2d array arr[][], match items from the left to its corresponding answer on the right. - Answers
The index of the last row --> arr.length-1

The index of the item in the first row and first column. --> arr[0][0]

The index of the item in the first row and second column. --> arr[0][1]

The number of elements in an array. --> arr.length * arr[0].length

A student has created a Party class. The class contains variables to represent the following.

An int variable called numOfPeople to represent the number of people at the party.

A boolean variable called discoLightsOn to represent whether the disco ball is on.

A boolean variable called partyStarted to represent whether the party has started.

The object myParty is declared as type Party. Which of the following descriptions is accurate? - Answers
myParty is an instance of the Party class.

Which of the following is false about import statements? - Answers you must specify the class you are
importing in the import statement

Which will cause the shortest execution of a binary search looking for a value in an array of integers? -
Answers The value is in the middle of the array

What are some of the reasons you would use an enhanced for-each loop instead of a for loop?

I: If you wish to access every element of an array.

II: If you wish to modify elements of the array.

III: If you wish to refer to elements through a variable name instead of an array index - Answers I and III
only.

, Assume that nums in an instance field declared in a class

private ArrayList<Integer> nums;

and it has been created as an ArrayList object and it initially contains the following Integer values [0, 0,
4, 2, 5, 0, 3, 0]. If the same class has a method called numQuest defined as follows:

// precondition: nums.size() > 0;

// nums contains Integer objects

public void numQuest() {

int k = 0;

Integer zero = new Integer(0);

while (k < nums.size()) {

if (nums.get(k).equals(zero)) nums.remove(k);

k++; }

}

What will nums contain as a result of executing numQuest? - Answers [0, 4, 2, 5, 3]

What will print when the following code executes?

ArrayList<String> list1 = new ArrayList<String>();

list1.add("Anaya");

list1.add("Layla");

list1.add("Sharrie");

list1.set(1, "Destini");

list1.add(1, "Sarah");

System.out.println(list1);



You can reference this table for a description of some of the ArrayList methods. The E type refers to the
base type of the ArrayList: - Answers "Anaya", "Sarah", "Destini", "Sharrie"

Given the following Date class

Geschreven voor

Instelling
ITSC 1213
Vak
ITSC 1213

Documentinformatie

Geüpload op
15 juni 2025
Aantal pagina's
14
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$11.39
Krijg toegang tot het volledige document:

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

Maak kennis met de verkoper

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.
TutorJosh Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
441
Lid sinds
1 jaar
Aantal volgers
16
Documenten
31737
Laatst verkocht
1 dag geleden
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.5

73 beoordelingen

5
26
4
16
3
14
2
1
1
16

Recent door jou bekeken

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