Question: Consider the following CircusPerformer class declaration. public class CircusPerformer { private String performerName; private String actName; public CircusPerformer(String pN, String aN) { performerName = pN;
Consider the following CircusPerformer class declaration. public class CircusPerformer { private String performerName; private String actName; public CircusPerformer(String pN, String aN) { performerName = pN; actName = aN; } public String getPerformer() { return performerName; } public String getAct() { return actname; } public void act() { entrance(); performance(); exit(); } public void entrance() { System.out.println("Starts in ring center"); } public void performance() { System.out.println("Runs in circles"); } public void exit() { System.out.println("Exits from ring center"); } } Consider the following code segment and class. A HighWireJuggler is a TightRopeWalker who juggles as he walks and flips on a tight rope. HighWireJuggler kathy = new HighWireJuggler("Kathy", "High Wire Juggling"); kathy.act(); public class TightRopeWalker extends CircusPerformer { public TightRopeWalker (String pN, String aN) { super(pN, aN); } public void entrance() { System.out.println("Starts from tight rope platform"); } public void performance() { System.out.println("Walks and flips on the tight rope"); } public void exit() { System.out.println("Exit from tight rope platform"); } } public class HighWireJuggler extends TightRopeWalker { public HighWireJuggler(String pN, String aN) { super(pN, aN); } } What is printed as a result of executing the code segment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
