Java > class CatLike

Titreclass CatLike
Postée le10-10-2008
Affichée667
Mini-lien
Description

enregistrement de la classe

EtatInconnu. Inconnu.
Code d'insertion
Options
Afficher les numéros de lignes  Mettre la source en plein ecran  Selectionner la source  Partager sur Facebook 
Téléchargement Telecharger en format txt  Telecharger en format pdf  Telecharger en format java
Plein ecran
public class CatLike {

        private String name;
       
        private String color;
       
        private float weight;
       
        private static Random random = new Random();
       
       
        public CatLike(String name, String color){
                this(name, color, random.nextFloat());
        }
       
        public CatLike(String name, String color, float weight, Owner owner){
                this.weight = weight;
                this.name = name;
                this.color = color;
               
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public String getColor() {
                return color;
        }

        public void setColor(String color) {
                this.color = color;
        }

        public float getWeight() {
                return weight;
        }

        public void setWeight(float weight) {
                this.weight = weight;
        }

        public static Random getRandom() {
                return random;
        }

        public static void setRandom(Random random) {
                CatLike.random = random;
        }
       
       

}