100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
test 4 Deerfield Beach High School ENGLISH LA engish MYP $11.99   Add to cart

Exam (elaborations)

test 4 Deerfield Beach High School ENGLISH LA engish MYP

 1 view  0 purchase
  • Course
  • Institution

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 ||...

[Show more]

Preview 4 out of 41  pages

  • April 17, 2023
  • 41
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamsConnoisseur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77764 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.99
  • (0)
  Add to cart