Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Baloncesto
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- package baloncesto;
- import java.io.*;
- import java.util.*;
- public class Jugador {
- private String nombre;
- private int dorsal;
- private double altura;
- private String puesto;
- public Jugador (String n, int d, double a, String p) {
- this.nombre=n;
- this.dorsal=d;
- this.altura=a;
- this.puesto=p;
- }
- public double getAltura() { return altura; }
- public int getDorsal() { return dorsal; }
- public String toString(){
- String s=" ";
- s="Dorsal: "+dorsal+" Nombre: "+nombre+" Posición: "+puesto+" Altura: "+altura;
- return s;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement