From 9fe033ea88c2f705ec18c232873d056e0c229d72 Mon Sep 17 00:00:00 2001 From: Gaspard Coulet Date: Wed, 28 Apr 2021 23:05:53 +0200 Subject: Initial commit --- .../eclipse-workspace/Laponie/src/Objpostal.java | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sem_4/java/eclipse-workspace/Laponie/src/Objpostal.java (limited to 'sem_4/java/eclipse-workspace/Laponie/src/Objpostal.java') diff --git a/sem_4/java/eclipse-workspace/Laponie/src/Objpostal.java b/sem_4/java/eclipse-workspace/Laponie/src/Objpostal.java new file mode 100644 index 0000000..384438f --- /dev/null +++ b/sem_4/java/eclipse-workspace/Laponie/src/Objpostal.java @@ -0,0 +1,76 @@ + +public abstract class Objpostal { + private String origine; + private String destination; + private int codepost; + private double poids; + private double vol; + private int tauxrecommand; + private double tauxremboursement; + protected void setTauxRemboursement (double taux ) { + tauxremboursement = taux; + } + protected double getTauxRemboursement () { + return tauxremboursement; + } + + public int tauxrecommand () { + return this.tauxrecommand; + } + + protected String getOrigine() { + return origine; + } + + protected void setOrigine(String origine) { + this.origine = origine; + } + + protected String getDestination() { + return destination; + } + + protected void setDestination(String destination) { + this.destination = destination; + } + + protected int getCodepost() { + return codepost; + } + + protected void setCodepost(int codepost) { + this.codepost = codepost; + } + + protected double getPoids() { + return poids; + } + + protected void setPoids(double poids) { + this.poids = poids; + } + + protected double getVol() { + return vol; + } + + protected void setVol(double vol) { + this.vol = vol; + } + + protected int getTauxrecommand() { + return tauxrecommand; + } + + protected void setTauxrecommand(int tauxrecommand) { + this.tauxrecommand = tauxrecommand; + } + public Objpostal (String ext_origin, String ext_dest, int ext_codepost, double ext_poid, double ext_volume, int ext_tauxrec) { + this.setOrigine(ext_origin); + this.setDestination(ext_dest); + this.setCodepost(ext_codepost); + this.setPoids(ext_poid); + this.setVol(ext_volume); + this.setTauxrecommand(ext_tauxrec); + } +} -- cgit v1.2.3