-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTransportDirecte.java
More file actions
43 lines (36 loc) · 887 Bytes
/
TransportDirecte.java
File metadata and controls
43 lines (36 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package prop;
public class TransportDirecte{
private final String origen;
private final String desti;
private final String mitja;
private final int durada;
private final double preu;
public TransportDirecte(String o, String d, String m, int _durada, double _preu){
origen=o;
desti=d;
mitja=m;
durada=_durada;
preu=_preu;
}
/**
* @pre --
* @return retorna el preu de l'objecte actual
*/
public double obtenirPreu(){
return preu;
}
/**
* @pre --
* @return retorna el temps en minuts del trajecte
*/
public int obtenirDurada(){
return durada;
}
/**
* @pre --
* @return retorna el desti del transport
*/
public String obtenirDesti(){
return desti;
}
}