aboutsummaryrefslogtreecommitdiff
path: root/semestre 4/java/tme/tp3/Cabine.java
diff options
context:
space:
mode:
Diffstat (limited to 'semestre 4/java/tme/tp3/Cabine.java')
-rw-r--r--semestre 4/java/tme/tp3/Cabine.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/semestre 4/java/tme/tp3/Cabine.java b/semestre 4/java/tme/tp3/Cabine.java
new file mode 100644
index 0000000..2b65abe
--- /dev/null
+++ b/semestre 4/java/tme/tp3/Cabine.java
@@ -0,0 +1,22 @@
+public class Cabine {
+ private int volume;
+ private String couleur;
+
+ public Cabine(int vol, String col) {
+ volume = vol;
+ couleur = col;
+ }
+
+ public Cabine(Cabine cb) {
+ volume = cb.volume;
+ couleur = cb.couleur;
+ }
+
+ public String toString() {
+ return String.format("Cabine{%d, %s}", volume, couleur);
+ }
+
+ public void setCouleur(String col) {
+ couleur = col;
+ }
+}