Question

In JAVAAlgorithm Workbench 1. Write the first line of the definition for a Poodle class. The class should extend the Dog class. 2. L

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: According to HOMEWORKLIB POLICY we can't answer more than 4 subparts of a question, please ask other problems as a separate question. I hope you understand. Thank You

If you have any problem in understanding the answer feel free to comment

Answer 1.

public class Poodle extends Dog{

//write the characteristics and behavior of the class

}

Answer 2.

In the main method when the constructor of the Tiger class is called it will pass the call to its superclass Feils. So first Felis constructor is called and then Tiger constructor is called.

Answer 3.

//demo class

public class B extends A{

public B(int x, int y, int z){ //considering there are type as int

super(x, y, z);//passing the values to superclass constructor

}

}

Answer 4.

We can use this superclass method using super keyword: super.setValue(10);

Add a comment
Know the answer?
Add Answer to:
In JAVA Algorithm Workbench 1. Write the first line of the definition for a Poodle class....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone please help with this in JAVA? Write one application program by using the following...

    Can someone please help with this in JAVA? Write one application program by using the following requirements: 1) Exception handling 2) Inheritance a) At least one superclass or abstract superclass: this class needs to have data members, accessor, mutator, and toString methods b) At least one subclass: this class also needs to have data members, accessor, mutator, and toString methods c) At least one interface: this interface needs to have at least two abstract methods d) At least one method...

  • Write ONE application program by using the following requirements: Using JAVA File input and outp...

    Write ONE application program by using the following requirements: Using JAVA File input and output Exception handling Inheritance At least one superclass or abstract superclass: this class needs to have data members, accessor, mutator, and toString methods At least one subclass: this class also needs to have data members, accessor, mutator, and toString methods At least one interface: this interface needs to have at least two abstract methods At least one method overloading At least one method overriding At least...

  • In Java Which of the following statements declares Salaried as a subclass of payType? Public class...

    In Java Which of the following statements declares Salaried as a subclass of payType? Public class Salaried implements PayType Public class Salaried derivedFrom(payType) Public class PayType derives Salaried Public class Salaried extends PayType If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. False True When a subclass overloads a superclass method………. Only the subclass method may be called with a subclass object Only the superclass method...

  • Create the Python code for a program adhering to the following specifications. Write an Employee class...

    Create the Python code for a program adhering to the following specifications. Write an Employee class that keeps data attributes for the following pieces of information: - Employee Name (a string) - Employee Number (a string) Make sure to create all the accessor, mutator, and __str__ methods for the object. Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information: - Shift number (an integer,...

  • Write the declaration for class Building. The class’s members should be: doors, an integer. This variable...

    Write the declaration for class Building. The class’s members should be: doors, an integer. This variable should not be accessible to code outside the class or to member functions in any class derived from class Building. steps, an integer. This variable should not be accessible to code outside the class, but should be accessible to member functions in any class derived from class Building. setDoors, getDoors, setSteps, and getSteps. These are the set and get functions for the member variables...

  • Write a java class definition for a circle object. The object should be capable of setting...

    Write a java class definition for a circle object. The object should be capable of setting radius, and computing its area and circumference. Use this to create two Circle objects with radius 10 and 40.5, respectively. Print their areas and circumference. Here is the Java class file (Circle.java). Compile it. public class Circle{ //Instance Variables private double PI = 3.1459; private double radius; //Methods public Circle ( ) { }    //get method (Accessor Methods ) public double getRadius (...

  • PRG/421 Week One Analyze Assignment – Analyzing a Java™Program Containing Abstract and Derived Classes 1.    What is...

    PRG/421 Week One Analyze Assignment – Analyzing a Java™Program Containing Abstract and Derived Classes 1.    What is the output of the program as it is written? (Program begins on p. 2) 2. Why would a programmer choose to define a method in an abstract class (such as the Animal constructor method or the getName()method in the code example) vs. defining a method as abstract (such as the makeSound()method in the example)? /********************************************************************** *           Program:          PRG/421 Week 1 Analyze Assignment *           Purpose:         Analyze the coding for...

  • text format separate by 1) 2) Point3D Class Write a class named Point3D that extends the...

    text format separate by 1) 2) Point3D Class Write a class named Point3D that extends the generic Point class you wrote in Tuesday's lab. The Point3D class is generic but restricted to Number and its subclasses. The Point3D class has a z field that contains the z coordinate. Provide a constructor for the Point3D class. Provide an accessor and mutator for field Z. Demonstrate in a main method. PointList Class Write a class named PointList that keeps a list of...

  • also write accessor and mutator methods for the class. please Given the CarRecord class definition below...

    also write accessor and mutator methods for the class. please Given the CarRecord class definition below define the following: 1) A default constructor that initializes yearMade to 2006 and vehicleldNum to 1000. 2) An overloaded constructor that initializes yearMade and vehicleldNum to values passed as parameters. public class CarRecord { private int yearMade; private int vehicleldNum; }

  • Question 60.1 pts Which of the following is true about a concrete class? A concrete class...

    Question 60.1 pts Which of the following is true about a concrete class? A concrete class may be extended. A concrete class may be instantiated. A concrete may NOT contain abstract methods. All of the above. None of the above. Flag this Question Question 70.1 pts Which of the following is true? A class extends exactly one other class and may implement any number of interfaces. A class may extend at most one concrete class, may extend any number of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT