From 2c530f2a58014e8e9479c41dabff9a639e9297a5 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 16 Feb 2026 10:16:31 +0100 Subject: =?UTF-8?q?Cours=20du=2002=20au=2013=20f=C3=A9vrier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- semestre 4/java/tme/tp3/Cabine.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 semestre 4/java/tme/tp3/Cabine.java (limited to 'semestre 4/java/tme/tp3/Cabine.java') 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; + } +} -- cgit v1.2.3