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

QUESTION 13 @Override public String toString() { Return String.format(“%s: %s %s

ID: 3598571 • Letter: Q

Question

QUESTION 13

@Override

public String toString()

{

Return String.format(“%s: %s %s %s: %s %s: %.2f %s: %.2f”, “commission employee”,      

firstName, lastName, “social security number”, socialSecurityNumber, “gross sales”, grossSales, “commission rate”, commissionRate);

} //end method toString

@Override annotation is used to indicate that method toString should override a subclass method.

@Override annotation is used to indicate that method toString should overload a superclass method.

@Override annotation is used to indicate that method toString should override a superclass method.

@Override annotation is used to indicate that method toString should overload a subclass method.

1 points   

QUESTION 14

What method is called when an applet first begins running?

init()

start()

main()

initialize()

1 points   

QUESTION 15

What method is called when an applet is removed from the system?

destroy()

remove()

destruct()

delete()

1 points   

QUESTION 16

Which method is invoked for an applet each time a browser’s user leaves an HTML page on which the applet resides?

complete

destroy

stop

end

1 points   

QUESTION 17

Every applet should extend class

Applet

JApplet

a and b

a or b

1 points   

QUESTION 18

Which of the followings can be used to execute a Java applet?

appletviewer or a browser

appletviewer or a compiler

a browser or a compiler

any of the above

1 points   

QUESTION 19

What method is invoked to draw on an applet

start

<applet>

paint

init

1 points   

QUESTION 20

The HTML tags that we use to specify that an applet should be loaded into an applet container and executed.

<body>, </body>

<load>, </load>

<applet> , </applet>

<html>, </html>

a.

@Override annotation is used to indicate that method toString should override a subclass method.

b.

@Override annotation is used to indicate that method toString should overload a superclass method.

c.

@Override annotation is used to indicate that method toString should override a superclass method.

d.

@Override annotation is used to indicate that method toString should overload a subclass method.

Explanation / Answer

Hi, I have answere first 4 questions.

Please repost other in separate post.

13)

public String toString(){

return String.format(“%s: %s %s %s: %s %s: %.2f %s: %.2f”, “commission employee”,   

firstName, lastName, “social security number”, socialSecurityNumber, “gross sales”, grossSales, “commission rate”, commissionRate);

} //end method toString

Ans: @Override annotation is used to indicate that method toString should override a superclass method.

14)

Ans: a.init()

The init() method is called exactly once in an applet's life, when the applet is first loaded.

The start() method is called at least once in an applet's life, when the applet is started or restarted.

The stop() method is called at least once in an applet's life, when the browser leaves the page in which the applet is embedded

The destroy() method is called exactly once in an applet's life, just before the browser unloads the applet.

15) What method is called when an applet is removed from the system?

Ans: a. destroy()

16)

Which method is invoked for an applet each time a browser’s user leaves an HTML page on which the applet resides?

Ans: stop

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