subject
Computers and Technology, 19.05.2021 04:00 ft2134

DogRunner. java /*
* Activity 1.2.4
*/
public class DogRunner
{
public static void main(String[] args)
{

}
}
public class Dog
{
public Dog(String name)
{
System. out. println("Hi! I am a dog. My name is " + name + ".");
}

public void sit()
{
System. out. println("OK! I am sitting.");
}

public void speak()
{
System. out. println("arf arf!");
}

public void walk(int num)
{
System. out. println("I love to walk for " + num + " minutes.");
}

public void walk(int num, String park)
{
System. out. println("I love to walk for " + num + " minutes and go to " + park + "!");
}

public void eat(String food)
{
System. out. println("I eat " + food + ".");
}

public void eat(String food, int num)
{
System. out. println("I eat " + food + " " + num + " times a day.");
}

public void eat(String food, double amount, int num)
{
System. out. println("I eat " + amount + " cups of " + food + " " + num + " times a day.");
}

public void setAge(int years)
{
System. out. println("I am " + years + " years old.");
}

public void setAge(int years, int months)
{
System. out. println("I am " + years + " years and " + months + " months old.");
}
public void setAge(double years)
{
System. out. println("I am " + years + " years old.");
}

public void play(String toy)
{
System. out. println("Oh boy! I get to play with my " + toy + "!");
}

}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:30
Which of the following is step 5 to the mail merge process
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior
Answers: 1
You know the right answer?
DogRunner. java /*
* Activity 1.2.4
*/
public class DogRunner
{
publi...
Questions