Answered step by step
Verified Expert Solution
Question
1 Approved Answer
If you wanted to create a class of Animals, you could use the following base class: Which selection would create a subclass of Bird with
If you wanted to create a class of Animals, you could use the following base class: Which selection would create a subclass of Bird with a constructor that takes in the name and number of wings, but sets the number of wings to 2 and the legs to 2 without user input? public class Bird extends Animal\{ private int noofWings; public Bird (int wings) \{ super(); this. noofWings=wings; \} public class Bird extends Animal \{ private int noofWings; public Bird(String name, int wings) \{ super(2, name); this. noofWings=wings; \} public class Bird extends Animal \{ private int noofWings; public Bird(int legs, String name, int wings) \{ super(legs, name); this. noofWings=wings; \} public class Bird extends Animal \{ private int noofWings; public Bird(String name) \{ super(2, name); this. noofWings=2; \}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started