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"
![](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_320,h_80/http://academicheroes.com/wp-content/uploads/2018/09/order_now.png)