Question: please help ne soon as possible Create a class Called Dog It has 2 attribuites all private name age Create a constructor for Dog: public

 please help ne soon as possible Create a class Called Dog

please help ne soon as possible

Create a class Called Dog It has 2 attribuites all private name age Create a constructor for Dog: public Dog(String name, int age) Set and get method for all of attributes 6. Create a method called poop() It prints: clean the dog Create a method called toString() In the main just create a dog obj with name "apple", age 2 and set the age to 5 then print the name and age Dog myDog=Dog("apple", 2); System.out.println(myDog.toString()); Use the set and get method to set the value to 5 and print the value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!