-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMise.java
38 lines (32 loc) · 872 Bytes
/
Mise.java
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
/**
* Mise.java
*
* Created on 9 vril 2007
*
* @author BRUN Joel & DEBONNEL Yann
*/
import java.util.Date;
import java.text.DateFormat;
public class Mise implements java.io.Serializable {
private static int ids=1;
private int id;
private String client;
private float montant;
//private Date dateMise;
private String dateMise;
DateFormat timeFormat=DateFormat.getTimeInstance();
public Mise(String client, float montant){
this.client = client;
this.id = ids++;
this.dateMise = timeFormat.format(new Date());
this.montant = montant;
}
public int getID(){ return id;}
public String getClient(){ return client;}
public float getMontant(){ return montant;}
public int print(){
String st = montant+"$ par "+client+ " à "+dateMise;
System.out.print(st);
return st.length();
}
}