Aethox

Carrera

Aug 26th, 2021
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package Modelo;
  2.  
  3. /**
  4.  *
  5.  * @author PrSala408
  6.  */
  7. public class Carrera {
  8.     private String[] estaciones;
  9.     private String nombre;
  10.     public Carrera(String nombre){
  11.         estaciones =  new String[5];
  12.         estaciones[0]="partida";
  13.         estaciones[1]="100mts";
  14.         estaciones[2]="200mts";
  15.         estaciones[3]="300mts";
  16.         estaciones[4]="400mts";        
  17.     }
  18.  
  19.     Carrera() {
  20.         throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
  21.     }
  22.  
  23.     public String getEstaciones(int i) {
  24.         return estaciones[i];
  25.     }
  26.  
  27.     public String getNombre() {
  28.         return nombre;
  29.     }
  30.    
  31.    
  32.    
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment