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

5 points QUESTION 2 What would be the best description of polymorphism. A java o

ID: 3831200 • Letter: 5

Question

5 points   

QUESTION 2

What would be the best description of polymorphism.

A java object that can be attached to or refer to more than one class.

An object that refers to its parent.

An object that refers to itself.

Downcasting.

5 points   

QUESTION 3

Java Swing classes allow for text components to be read only via what method?

setReadOnly()

setEditable()

setEditOnly()

setTextReadOnly()

5 points   

QUESTION 4

A constructor is a special kind of method within a class having the following features:

1) the name of the method is the same as the class name

2) it does not have any return type not even void

3) like other methods, constructors can also be overloaded

Choose the correct assumption(s) from the listing above.

Only assumption 1 is correct.

Assumptions 1 & 2 are correct

None are correct.

All assumptions are good.

5 points   

QUESTION 5

When creating a jar file (for executing a java program for a user) you can only choose one file in your package that has main().

True

False

5 points   

QUESTION 6

Which of the following is true about protected access?

Protected members cannot be accessed by methods in any other classes.

Protected members may be accessed by methods in the same package or in a subclass, but only if the subclass is in the same package.

Protected members may be accessed by methods in the same package or in a subclass, even when the subclass is in a different package.

Protected members are actually named constants.

5 points   

QUESTION 7

In the following code, System.out.println(num), is an example of ________.

double num = 5.4;

System.out.println(num);

num = 0.0;

A value-returning method          

A local variable

A complex method      

A void method

5 points   

QUESTION 8

A column in one table that references a primary key in another table is known as what?      

referential key    

secondary key

foreign key    

meta data   

5 points   

QUESTION 9

Which is not a solid example of encapsulation?

A Car class having a has-a relation with class Parts

Taking for granted a wikipedia definition

A washing machine and its use of a power Button

java.util.Hashtable

5 points   

QUESTION 10

Given the depiction below, the relation of Song to Artist is one to one.

True

False

5 points   

A java object that can be attached to or refer to more than one class.

An object that refers to its parent.

An object that refers to itself.

Downcasting.

Artist Performs Song

Explanation / Answer

Q2. What would be the best description of polymorphism.
Answer : A java object that can be attached to or refer to more than one class.

Q3. Java Swing classes allow for text components to be read only via what method ?
Answer : setEditable(false)

Q4. A constructor is a special kind of method within a class having the following features:
Answer :Assumptions 1 & 2 are correct
1) the name of the method is the same as the class name
2) it does not have any return type not even void

Q5. When creating a jar file (for executing a java program for a user) you can only choose one file in your package that has main().
Answer : TRUE

Q6. Which of the following is true about protected access?
Answer : Protected members may be accessed by methods in the same package or in a subclass, even when the subclass is in a different package.

Q7. In the following code, System.out.println(num), is an example of ________.
double num = 5.4;
System.out.println(num);
num = 0.0;
Answer :    A value-returning method

Q8. A column in one table that references a primary key in another table is known as what?   
Answer : foreign key

Q9.Given the depiction below, the relation of Song to Artist is one to one.
Answer : True   

Thanks...

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