Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider int sophie = 5; Which of the following are reference variables? (Note t

ID: 3601253 • Letter: C

Question

Consider

int sophie = 5;

Which of the following are reference variables? (Note that this is a multiple answer question.)

Question 2

Consider

TV livingRoom = null;

TV den;

new TV();

den = new TV();

Enter the line number where den is declared. Enter x if there is no such line.

Question 3

Consider

TV livingRoom = null;

TV den;

new TV();

den = new TV();

Enter the first line number in which an object refence is assigned to a variable. Enter x if there is no such line.

Question 4

Consider

TV livingRoom = null;

TV den;

new TV();

den = new TV();

livingRoom = new TV();

Write a statement that calls a method to increase the volume of the den's TV. (Use no spaces in your answer.)

Question 5

A class is to an object as

Question 6

What operator creates an object?

Question 7

Constructors differ from other methods in that they

Question 8

Consider

Date today;

today = new Date();

Date tomorrow;

tomorrow = today;

Which of the following is correct?

Question 9

Consider

int sophie = 5;

Which of the following are data types? (Note that this is a multiple answer question.)

Question 10

Consider

TV livingRoom = null;

TV den;

new TV();

den = new TV();

Enter the line number of the first creation of an object. Enter x if there is no such line.

Question 11

Consider

int sophie = 5;

Which of the following variables are declared as a primitive type? (Note that this is a multiple answer question.)

Question 12

Consider

int sophie = 5;

Which of the following are correct?   (Note that this is a multiple answer question.)

Consider

  TV gameroom;  
  String favProgram = "Twilight Zone";  

int sophie = 5;

Which of the following are reference variables? (Note that this is a multiple answer question.)

Explanation / Answer

Question1:
ANS: Reference variables are: favprogram &.

Question 2:
Answer: TV den;

Actually den is an object(instance of TV class) that is Declared
in Second line.
And Creating references to an object in 3rd Line.

Question 3:
Ans:
Line 4.den=new TV();
here,creating class that have some Member varibles.
and object "den" referring to the Member variables.

Question 4:

Answer:
dens.increaseVoulme();

Question 5:
Usually class is a blue Print for an object.

Question 6:
New operator.

Question 7:
Ans: Constructors have No return Type.

Question 8:
Ans: a) New Date Object is created with the same values as today's Date Object,
And that object is copied into tomorrow's Memory.

Question 9:
Ans: datatypes are : string and int

Question 10:
Ans: Line 1.created an object called "livingRoom" that references to null memory.

Question 11:
Ans: int sophie=5;

Question 12:
Ans:
D.Gameroom references to (ponits to)TV object(or contains the value null).
favprogram actually contains the characters "Twilight Zone".
Sophie Actually contains the Numeric value '5'.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote