MCPcopy Create free account
hub / github.com/JerePrograma/FullStackEgg / Barco

Class Barco

Etapa3Herencia/Ejercicio1Extra/src/entidad/Barco.java:4–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2//Un Barco se caracteriza por: su matrícula, su eslora en metros y año de fabricación.
3
4abstract class Barco {
5
6 protected String matricula;
7 protected double eslora;
8 protected int anio;
9
10 public Barco() {
11 }
12
13 public Barco(String matricula, double eslora, int anio) {
14 this.matricula = matricula;
15 this.eslora = eslora;
16 this.anio = anio;
17 }
18
19 public String getMatricula() {
20 return matricula;
21 }
22
23 public void setMatricula(String matricula) {
24 this.matricula = matricula;
25 }
26
27 public double getEslora() {
28 return eslora;
29 }
30
31 public void setEslora(double eslora) {
32 this.eslora = eslora;
33 }
34
35 public int getAnio() {
36 return anio;
37 }
38
39 public void setAnio(int anio) {
40 this.anio = anio;
41 }
42
43}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected