Assume you have a class named Rabbit which has four methods: GetColor(), SetColor(), GetName(), and SetName(). One object of type Rabbit is named MyRabbitand has Color = “white” and Name = “Peter”. Which set of statements would display the following to the screen:
“Peter is a white rabbit.”.

a. Write MyRabbit.GetName()+“ is a “+MyRabbit.GetColor()+“rabbit.”.
b. Write Peter + “ is a “ + White + “ rabbit.”.
c. Write Peter.SetName() + “ is a “ + Peter.SetColor() + “ rabbit.”.
d. Write Rabbit.Peter + “ is a “ + Rabbit.White + “ rabbit.”.

A

Computer Science & Information Technology

You might also like to view...

E-lists are used from time to time for the purpose of discussion with list members

Indicate whether the statement is true or false

Computer Science & Information Technology

A(n) SDK is a set of development tools that you can use to create applications for software programs, devices, or hardware platforms.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology