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)

OSU CSE 2221 MIDTERM 2 STUDY GUIDE 2025| BRAND NEW ACTUAL EXAM WITH 100% VERIFIED QUESTIONS AND CORRECT SOLUTIONS| GUARANTEED VALUE PACK| ACE YOUR GRADES.

Beoordeling
-
Verkocht
-
Pagina's
19
Cijfer
A+
Geüpload op
28-03-2025
Geschreven in
2024/2025

OSU CSE 2221 MIDTERM 2 STUDY GUIDE 2025| BRAND NEW ACTUAL EXAM WITH 100% VERIFIED QUESTIONS AND CORRECT SOLUTIONS| GUARANTEED VALUE PACK| ACE YOUR GRADES.

Instelling
OSU CSE 2221
Vak
OSU CSE 2221

Voorbeeld van de inhoud

1|Page



OSU CSE 2221 MIDTERM 2 STUDY GUIDE 2025|
BRAND NEW ACTUAL EXAM WITH 100% VERIFIED
QUESTIONS AND CORRECT SOLUTIONS|
GUARANTEED VALUE PACK| ACE YOUR GRADES.
In design-by-contract, the code responsible for making sure the precondition
(requires clause) is true when a method is called is:



A. the client code that calls the method



B. the code that implements the method



C. both the client and the implementation code



D. neither the client nor the implementation code - (answers)A



Consider the following method signature and, below it, a call to it:



private static int examScore (int studentNumber) {...}

int k = examScore(42);



A. cause the program to crash when it is executed (i.e., it's a run time error)



B. assign an exam score of 42 to student k

,2|Page




C. be legal in Java (though flagged by CheckStyle)



D. be illegal in Java (i.e., it's a compile-time error) - (answers)C



Which statement is true of testing?



A. Testing can prove the correctness of software.



B. Testing can show the presence of defects.



C. Testing can show the absence of defects.



D. If you test a method once for a given input, and it produces correct results,
then the method body is correct for that input. - (answers)B



Which parameter mode is the default for contracts used in this course?



A. Clears

B. Replaces

C. Restores

D. Updates - (answers)C

, 3|Page




Which parameter mode means the outgoing value, in fact the entire behavior of
the method, is independent of the incoming value of that parameter?



A. Clears

B. Replaces

C. Restores

D. Updates - (answers)B



Assume n in an int variable. Which Java expression is true exactly when n is an
odd number, i.e., not divisible by 2, and should be used to check for this
situation?



A. n % 2 == 1

B. n % 2 != 1

C. n % 2 == 0

D. n % 2 != 0 - (answers)D



A type is "primitive type" if:



A. It is illegal to copy a reference to that type, so there can be no aliasing.



B. Variables of that type cannot be passed to any method.

Geschreven voor

Instelling
OSU CSE 2221
Vak
OSU CSE 2221

Documentinformatie

Geüpload op
28 maart 2025
Aantal pagina's
19
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Gratis
Krijg toegang tot het volledige document:
Downloaden

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
Nelly003

Maak kennis met de verkoper

Seller avatar
Nelly003 Teachme2-tutor
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
452
Lid sinds
1 jaar
Aantal volgers
2
Documenten
3049
Laatst verkocht
7 uur geleden

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

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