Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following abstract Dance class. abstract class Dance {private String music public Dance (String m) {music = m;} public String getMusic () {return music;}

image text in transcribed
Consider the following abstract Dance class. abstract class Dance {private String music public Dance (String m) {music = m;} public String getMusic () {return music;} public abstract void playMusic(); public abstract void danceBasic ();} Which the following classes correctly declares a subclass of Dance? Subclass-1 class Tango extends Dance {public Tango (String m) {super (m);} public void playMusic () {System. out. println ("Play" + getMusic();} public void danceBasic () {System. out. println ("Dance fwd, fwd, fwd-side-drag");}} Subclass-2 class Tango extends Dance {public Tango() {} public void playMusic() {System. out. println ("Play music");} {System. out. println ("Dance fwd, fwd, fwd-side-drag");}} Subclass-3 class Tango extends Dance {public void playMusic () {System. out. println ("Play music");} public void danceBasic () {System. out. println ("Dance fwd, fwd, fwd-side-drag");} public void makeRoutine () {System. out. println ("Make dance routine");}} (A) Subclass-1 only (B) Subclass-2 only (C) Subclass-3 only (D) Subclass-2 and Subclass-3 only (E) Subclass-1, Subclass-2 and Subclass-3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Identify the steps in job analysis.

Answered: 1 week ago

Question

=+and reduction in force, and intellectual property.

Answered: 1 week ago