fin seance
This commit is contained in:
parent
9de6cd5cd6
commit
7fdf3e34ef
65
2020-2021/src/TD4/travel/Description.java
Normal file
65
2020-2021/src/TD4/travel/Description.java
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
package TD4.travel;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class Description {
|
||||||
|
|
||||||
|
private LocalDate departDate;
|
||||||
|
private String departPlace;
|
||||||
|
private String arrivalPlace;
|
||||||
|
private int duration;
|
||||||
|
|
||||||
|
public Description( ) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the departDate
|
||||||
|
*/
|
||||||
|
public LocalDate getDepartDate() {
|
||||||
|
return departDate;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param departDate the departDate to set
|
||||||
|
*/
|
||||||
|
public void setDepartDate(LocalDate departDate) {
|
||||||
|
this.departDate = departDate;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return the departPlace
|
||||||
|
*/
|
||||||
|
public String getDepartPlace() {
|
||||||
|
return departPlace;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param departPlace the departPlace to set
|
||||||
|
*/
|
||||||
|
public void setDepartPlace(String departPlace) {
|
||||||
|
this.departPlace = departPlace;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return the arrivalPlace
|
||||||
|
*/
|
||||||
|
public String getArrivalPlace() {
|
||||||
|
return arrivalPlace;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param arrivalPlace the arrivalPlace to set
|
||||||
|
*/
|
||||||
|
public void setArrivalPlace(String arrivalPlace) {
|
||||||
|
this.arrivalPlace = arrivalPlace;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return the duration
|
||||||
|
*/
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param duration the duration to set
|
||||||
|
*/
|
||||||
|
public void setDuration(int duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
5
2020-2021/src/TD4/travel/Product.java
Normal file
5
2020-2021/src/TD4/travel/Product.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package TD4.travel;
|
||||||
|
|
||||||
|
public interface Product {
|
||||||
|
public double getPrice();
|
||||||
|
}
|
5
2020-2021/src/TD4/travel/Service.java
Normal file
5
2020-2021/src/TD4/travel/Service.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package TD4.travel;
|
||||||
|
|
||||||
|
public interface Service {
|
||||||
|
public Product find(Description d);
|
||||||
|
}
|
5
2020-2021/src/TD4/travel/TravelOrganizer.java
Normal file
5
2020-2021/src/TD4/travel/TravelOrganizer.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package TD4.travel;
|
||||||
|
|
||||||
|
public class TravelOrganizer implements Service {
|
||||||
|
|
||||||
|
}
|
32
2020-2021/src/TD4/travel/Trip.java
Normal file
32
2020-2021/src/TD4/travel/Trip.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package TD4.travel;
|
||||||
|
|
||||||
|
public class Trip implements Product {
|
||||||
|
|
||||||
|
private Description desc;
|
||||||
|
|
||||||
|
public Trip(Description d) {
|
||||||
|
this.setDesc(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getPrice() {
|
||||||
|
return .0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addItem() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the desc
|
||||||
|
*/
|
||||||
|
public Description getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param desc the desc to set
|
||||||
|
*/
|
||||||
|
public void setDesc(Description desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
63
2020-2021/src/TD4/travel/travels.ucls
Normal file
63
2020-2021/src/TD4/travel/travels.ucls
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<class-diagram version="1.2.4" icons="true" always-add-relationships="false" generalizations="true" realizations="true"
|
||||||
|
associations="true" dependencies="false" nesting-relationships="true" router="FAN">
|
||||||
|
<class id="1" language="java" name="TD4.travel.Trip" project="M315" file="/M315/src/TD4/travel/Trip.java"
|
||||||
|
binary="false" corner="BOTTOM_RIGHT">
|
||||||
|
<position height="-1" width="-1" x="366" y="89"/>
|
||||||
|
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</display>
|
||||||
|
</class>
|
||||||
|
<class id="2" language="java" name="TD4.travel.Description" project="M315"
|
||||||
|
file="/M315/src/TD4/travel/Description.java" binary="false" corner="BOTTOM_RIGHT">
|
||||||
|
<position height="-1" width="-1" x="589" y="243"/>
|
||||||
|
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</display>
|
||||||
|
</class>
|
||||||
|
<interface id="3" language="java" name="TD4.travel.Product" project="M315" file="/M315/src/TD4/travel/Product.java"
|
||||||
|
binary="false" corner="BOTTOM_RIGHT">
|
||||||
|
<position height="-1" width="-1" x="583" y="81"/>
|
||||||
|
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</display>
|
||||||
|
</interface>
|
||||||
|
<class id="4" language="java" name="TD4.travel.TravelOrganizer" project="M315"
|
||||||
|
file="/M315/src/TD4/travel/TravelOrganizer.java" binary="false" corner="BOTTOM_RIGHT">
|
||||||
|
<position height="-1" width="-1" x="84" y="91"/>
|
||||||
|
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</display>
|
||||||
|
</class>
|
||||||
|
<interface id="5" language="java" name="TD4.travel.Service" project="M315" file="/M315/src/TD4/travel/Service.java"
|
||||||
|
binary="false" corner="BOTTOM_RIGHT">
|
||||||
|
<position height="-1" width="-1" x="101" y="391"/>
|
||||||
|
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</display>
|
||||||
|
</interface>
|
||||||
|
<realization id="6">
|
||||||
|
<end type="SOURCE" refId="1"/>
|
||||||
|
<end type="TARGET" refId="3"/>
|
||||||
|
</realization>
|
||||||
|
<realization id="7">
|
||||||
|
<end type="SOURCE" refId="4"/>
|
||||||
|
<end type="TARGET" refId="5"/>
|
||||||
|
</realization>
|
||||||
|
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
|
||||||
|
sort-features="false" accessors="true" visibility="true">
|
||||||
|
<attributes public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
<operations public="true" package="true" protected="true" private="true" static="true"/>
|
||||||
|
</classifier-display>
|
||||||
|
<association-display labels="true" multiplicity="true"/>
|
||||||
|
</class-diagram>
|
Loading…
x
Reference in New Issue
Block a user