GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Consider the following code segment. boolean a = true; boole…

Consider the following code segment. boolean a = true; boolean b = false; boolean temp = a;a = b;b = temp;System.out.println(a);System.out.println(b); What is printed as a result of executing this code segment?

Read Details

Consider the following code segment, which uses properly dec…

Consider the following code segment, which uses properly declared and initialized int variables x and y and the String variable result.     String result = “”; if (x < 5){ if (y > 0) { result += “a”; } else { result += “b”; }}else if (x > 10){ if (y < 0) { result += "c"; } else if (y < 10) { result += "d"; } result += "e";}result += "f";     What is the value of result after the code segment is executed if x has the value 15 and y has the value 5?

Read Details

Assume that you are given the following declarations: int nu…

Assume that you are given the following declarations: int num = 0;double val = 0.0;num = 9 % 6 / 4 – 4; Show the value that will be stored in the variable on the left. If the expression causes an error, just type ‘error.’

Read Details

Consider the following description of method printValues.  …

Consider the following description of method printValues.   Method printValues Method Signature Explanation public void printValues(int numTimes, int val) Prints the value of val a total of numTimes times, thenmoves the cursor to a new line.      Consider the following code segment, which appears in the same class as printValues.    printValues(2, 3);printValues(4, 5);   What is printed as a result of executing the code segment?

Read Details

Two computers are built by different manufacturers. One is r…

Two computers are built by different manufacturers. One is running a Web server and the other is running a Web browser. Which of the following best describes the ability of the two computers to communicate with each other across the Internet?  

Read Details

DineOutHelper is a mobile application that people can use to…

DineOutHelper is a mobile application that people can use to select a restaurant for a group meal. Each user creates a profile with a unique username and a list of food allergies or dietary restrictions. Each user can then build a contact list of other users of the app.   A user who is organizing a meal with a group selects all the members of the group from the user’s contact list. The application then recommends one or more nearby restaurants based on whether the restaurant can accommodate all of the group members’ allergies and dietary restrictions. Suppose that Alejandra is using DineOutHelper to organize a meal with Brandon and Cynthia.   Which of the following data is not provided by Alejandra but is necessary for DineOutHelper to recommend a restaurant for the group?   I. Brandon’s contact list II. Information about which restaurants Brandon and Cynthia have visited in the past III. Information about which food allergies and dietary restrictions can be accommodated at different restaurants near Alejandra

Read Details

In the following code segment, x is an int variable with a p…

In the following code segment, x is an int variable with a positive value.   int temp = x; while (temp > 0){ temp -= 2;}System.out.println(temp == 0);   Which of the following best describes the behavior of the code segment?

Read Details

If you ping too much, other computers might think you are a…

If you ping too much, other computers might think you are a hacker.

Read Details

A teacher sends students an anonymous survey in order to lea…

A teacher sends students an anonymous survey in order to learn more about the students’ work habits. The survey contains the following questions.   ● On average, how long does homework take you each night (in minutes)? ● On average, how long do you study for each test (in minutes)? ● Do you enjoy the subject material of this class (yes or no)?   Which of the following questions about the students who responded to the survey can the teacher answer by analyzing the survey results?   I. Do students who enjoy the subject material tend to spend more time on homework each night than the other students do? II. Do students who spend more time on homework each night tend to spend less time studying for tests than the other students do? III. Do students who spend more time studying for tests tend to earn higher grades in the class than the other students do?

Read Details

What is the output of the following code aList = [“Scout”, […

What is the output of the following code aList = [“Scout”, [2, 3, 44, 1]] print(aList[0][1]) print(aList[1][3])

Read Details

Posts pagination

Newer posts 1 … 886 887 888 889 890 … 87,273 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top