Consider the three classes Alpha, Beta, and Gamma. Which of the following is/are true (choose all that apply)? a. Alpha is a subclass of Beta b. Beta is a subclass of Gamma c. Gamma is a superclass of Alpha d. Beta is a superclass of Alpha public class Alpha extends Gamma { public String getTwo() { return("2"); } public String getTwo(int i) { return("two"); } } public class Beta extends Gamma{ public String getThree() { return ("3"); } public String getFour() { return ("four"); } } public abstract class Gamma { public String getOne() { return ("1"); } public String getFour() { return("4"); }

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
Consider the three classes Alpha, Beta, and Gamma.
Which of the following is/are true (choose all that apply)?
a. Alpha is a subclass of Beta
b. Beta is a subclass of Gamma
c. Gamma is a superclass of Alpha
d. Beta is a superclass of Alpha
public class Alpha extends Gamma {
public String getTwo() {
return("2");
}
public String getTwo(int i) {
return("two");
}
}
public class Beta extends Gamma{
public String getThree() {
return ("3");
}
public String getFour() {
return ("four");
}
}
public abstract class Gamma {
public String getOne() {
return ("1");
}
public String getFour() {
return("4");
}
}
Transcribed Image Text:Consider the three classes Alpha, Beta, and Gamma. Which of the following is/are true (choose all that apply)? a. Alpha is a subclass of Beta b. Beta is a subclass of Gamma c. Gamma is a superclass of Alpha d. Beta is a superclass of Alpha public class Alpha extends Gamma { public String getTwo() { return("2"); } public String getTwo(int i) { return("two"); } } public class Beta extends Gamma{ public String getThree() { return ("3"); } public String getFour() { return ("four"); } } public abstract class Gamma { public String getOne() { return ("1"); } public String getFour() { return("4"); } }
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,