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...

Which symbol indicates that a member is private a UML diagram?

a. - b. * c. # d. +

Computer Science & Information Technology

Linear structures work for Web sites that are large and have a clearly defined order of pages.

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

Computer Science & Information Technology

Which of the following is true of an embedded computer?

A. It is a tiny computer embedded into a product designed to perform specific tasks or functions for that product.? B. ?It is a mainframe computer embedded into a product designed to perform specific tasks or functions for that product. C. ?It is a supercomputer embedded into a product designed to perform specific tasks or functions for that product. D. ?It is a personal computer embedded into a product designed to perform specific tasks or functions for that product.

Computer Science & Information Technology

Critical Thinking Questions Case Study H-1Geoff Palmer is in the middle of an extensive Photoshop project -- an online tribute for his daughter's birthday. He thought the project would take a day or two at the most, but it has become much more than that. Mr. Palmer clicked the History panel list arrow, clicked History Options, and then clicked Automatically Create New Snapshot When Saving. Why?

A. He was worried that the saved snapshots might not appear on the History panel. B. He wanted the History panel to save a snapshot every time he saved his work. C. He wanted the History panel to log more than the default 20 states. D. He wanted Photoshop to automatically save his work every five minutes.

Computer Science & Information Technology