martes, 26 de febrero de 2008

ejercicios en blue j (1.28 al 1.32)

  • Exercise 1.28

What would you have to do to add a new field, for example one called name, to a circle object?

¿Qué sería de lo que tiene que hacer para añadir un nuevo campo, por ejemplo, uno Llamado neme, a un objeto círculo ?

  • Exercise 1.29

Write the signature for a method named send that has one parameter of type String, and does not return a value.

Escribir la firma de un método que ha llamado enviar un parámetro De tipo String, y no devuelve un valor.

Exercise 1.30

Write the signature for a method named average that has two
parameters, both of type int, and returns an int value.
Escribir la firma de un método llamado media que tiene dos Parámetros, tanto de tipo int, y devuelve un valor int.

  • Exercise 1.31

Look at the book you are reading right now. Is it an object or a class?
If it is a class, name some objects. If it is an object, name its class.

Vea el libro que está leyendo ahora mismo. ¿Es un objeto o una clase? Si se trata de una clase, el nombre de algunos objetos. Si se trata de un objeto, el nombre de su clase.
Es un objeto de la clase medios de información, por ejemplo.

  • Exercise 1.32

Can an object have several different classes? Discuss.
¿un objeto dispone de diferentes clases? Comentar.
llegamos a la conclusión de que un objeto si puede disponer d diferentes clases

No hay comentarios: