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)

test 4 Deerfield Beach High School ENGLISH LA engish MYP

Beoordeling
-
Verkocht
-
Pagina's
41
Cijfer
A+
Geüpload op
17-04-2023
Geschreven in
2022/2023

Student's Answers Question 1 Assuming that x and y are int variables, the expression !(x y && y = 0) is equivalent to which of the following? Gradebook: Student answers 5/1/17, 10:31 PM A. !(x = y) || (y 0) B. x y && y = 0 C. x = y || y 0 D. x y || y 0 E. x = y && y = 0 Question 1 A B C D E Score: 0 / 1 Submitted: 5/1/2017 10:30pm The following model answer has been provided to you by the grader. Carefully compare your answer with the one provided here. Use De Morgan's Laws. The answer is C. View the page Question 2 Which of the following describes the return value of the following method? /** Precondition: amt represents a positive value in dollars * and cents (for example, 1.15 represents * one dollar and fifteen cents) */ private int process(double amt) { return (int)(amt * 100 + 0.5) % 100; } A. the cent portion in amt B. the number of whole dollars in amt C. amt converted into cents D. amt rounded to the nearest integer E. the smallest number of whole dollars that is greater than or equal to amt Gradebook: Student answers 5/1/17, 10:31 PM Question 2 A B C D E Score: 0 / 1 Submitted: 5/1/2017 10:30pm The following model answer has been provided to you by the grader. Carefully compare your answer with the one provided here. % 100 leaves the last 2 digits. The answer is A. View the page Question 3 What is the output of the following code segment? int sum = 0, d = -1; for (int count = 10; count 0; count--) { sum += d; if (d 0) { d++; } else { d--; } d = -d; } Sln(sum); A. 0 B. 5 C. -5 D. 10 E. -10 Gradebook: Student answers 5/1/17, 10:31 PM Question 3 A B C D E Score: 0 / 1 Submitted: 5/1/2017 10:30pm The following model answer has been provided to you by the grader. Carefully compare your answer with the one provided here. 0 - 1 + 2 - 3 + 4 - ... + 10 = 0 + (-1 + 2) + ( -3 + 4) + ... + ( -9 + 10) = 5. The answer is B. View the page Question 4 Recall that in Java, the prefix 0x followed by one or more hexadecimal digits 0 - F defines an integer constant in the hexadecimal number system. For example, int n = 0xF; Sln(n); displays 15. What is the output from the following statement? Sln(0x10 + 10); A. 4 B. 12 C. 26 D. 32 E. 0x1010 Question 4 A B C D E Score: 0 / 1 Submitted: 5/1/2017 10:30pm Gradebook: Student answers 5/1/17, 10:31 PM The following model answer has been provided to you by the grader. Carefully compare your answer with the one provided here. 0x10 = 16. The answer is

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Gradebook: Student answers 5/1/17, 10:31 PM




My Grade Book
Grades for Aliyan Alli


Grades for Be Prepared (Java)–Practice Exam 4-I

This 90-minute timed test started 5/1/2017 10:30pm and finished 5/1/2017 10:30pm.
40 of 40 problems have been submitted, total points 0/40.


Question 1 Question 11 Question 21 Question 31


Question 2 Question 12 Question 22 Question 32


Question 3 Question 13 Question 23 Question 33


Question 4 Question 14 Question 24 Question 34


Question 4 Question 15 Question 25 Question 35


Question 6 Question 16 Question 26 Question 36


Question 7 Question 17 Question 27 Question 37


Question 8 Question 18 Question 28 Question 38


Question 9 Question 19 Question 29 Question 39


Question 10 Question 20 Question 30 Question 40



Student's Answers
Question 1


Assuming that x and y are int variables, the expression


!(x > y && y <= 0)


is equivalent to which of the following?


https://www.eimacs.com/eimacs/submissions?cid=47597&sid=E2266613020&wuid=E1925940&showanswers=1#submissionsanswers Page 1 of 41

,Gradebook: Student answers 5/1/17, 10:31 PM



A. !(x <= y) || (y > 0)
B. x > y && y <= 0
C. x <= y || y > 0
D. x > y || y < 0
E. x <= y && y <= 0

Question 1
A B C D E
Score:

Submitted: 5/1/2017 10:30pm




The following model answer has been provided to you by the grader. Carefully compare your
answer with the one provided here.

Use De Morgan's Laws.

The answer is C.


View the page

Question 2

Which of the following describes the return value of the following method?


/** Precondition: amt represents a positive value in dollars
* and cents (for example, 1.15 represents
* one dollar and fifteen cents)
*/
private int process(double amt)
{
return (int)(amt * 100 + 0.5) % 100;
}


A. the cent portion in amt

B. the number of whole dollars in amt

C. amt converted into cents
D. amt rounded to the nearest integer
E. the smallest number of whole dollars that is greater than or equal to amt


https://www.eimacs.com/eimacs/submissions?cid=47597&sid=E2266613020&wuid=E1925940&showanswers=1#submissionsanswers Page 2 of 41

,Gradebook: Student answers 5/1/17, 10:31 PM




Question 2
A B C D E
Score:

Submitted: 5/1/2017 10:30pm




The following model answer has been provided to you by the grader. Carefully compare your
answer with the one provided here.

% 100 leaves the last 2 digits.
The answer is A.


View the page

Question 3

What is the output of the following code segment?


int sum = 0, d = -1;

for (int count = 10; count > 0; count--)
{
sum += d;
if (d > 0)
{
d++;
}
else
{
d--;
}
d = -d;
}

System.out.println(sum);


A. 0
B. 5
C. -5
D. 10
E. -10


https://www.eimacs.com/eimacs/submissions?cid=47597&sid=E2266613020&wuid=E1925940&showanswers=1#submissionsanswers Page 3 of 41

, Gradebook: Student answers 5/1/17, 10:31 PM



Question 3
A B C D E
Score:

Submitted: 5/1/2017 10:30pm




The following model answer has been provided to you by the grader. Carefully compare your
answer with the one provided here.

0 - 1 + 2 - 3 + 4 - ... + 10
= 0 + (-1 + 2) + ( -3 + 4) + ... + ( -9 + 10)
= 5.

The answer is B.


View the page

Question 4


Recall that in Java, the prefix 0x followed by one or more hexadecimal digits 0 - F defines an integer constant in the
hexadecimal number system. For example,


int n = 0xF;
System.out.println(n);


displays 15. What is the output from the following statement?


System.out.println(0x10 + 10);


A. 4
B. 12
C. 26
D. 32
E. 0x1010

Question 4
A B C D E
Score:

Submitted: 5/1/2017 10:30pm


https://www.eimacs.com/eimacs/submissions?cid=47597&sid=E2266613020&wuid=E1925940&showanswers=1#submissionsanswers Page 4 of 41

Geschreven voor

Vak

Documentinformatie

Geüpload op
17 april 2023
Aantal pagina's
41
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$12.49
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.
ExamsConnoisseur Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
587
Lid sinds
3 jaar
Aantal volgers
344
Documenten
1492
Laatst verkocht
3 weken geleden

4.2

68 beoordelingen

5
40
4
11
3
13
2
1
1
3

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