Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

string

Dog type: string breed: string name: stringtopTrick:

string

setTopTrick(trick:string)

toString()

Corgi

weight:int

age:int

setWeight(pounds:int)

setAge(years:int)

toString()

Arrow pointing from table labeled Corgi to table labeled Dog

Name it the Driver class, then create the code:

No instance variables.

The main() method will be the only method in the class.

Need three lines of code in the main() method:

1)Instantiate a corgi object using the below syntax: className objectName = new className(input parameters). Refer to the constructors in the Dog and Corgi class to ensure the input parameters are correct.

2)ObjectName.setTopTrick() method to set a top trick for the dog you created.

3)Embed the objectName.toString() method in a statement that outputs to the console window.

public class Driver {

public static void main(String[] args) {

//code here

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"