@startuml
abstract class "Person"  as p{
    -idPerson: integer
    -nomPersone: string
    -prenomPersone: string
    -emailPerson: string
    -anneeDeNaissance: Date
    -adresse : string
}

class "Bibilotecaire" as b {

    -numeroAgent

    + ajouter(livre : Livre)
    + retirer(livre: Livre)
    + livreEstDisponible(livre: Livre):Boolean
}

class "Abonnee" as  a {

    -numeroAbonne: integer
    -punis:boolean
    +Empreunter(livre: Livre)
    +rendre(livre: Livre)
    +estPenalisee():Boolean
}

class "Livre" as l {

    -idLivre: integer
    -numeroISBN : integer
    -disponible: boolean
    -titreLivre: string
    -volume : string
    -datePublication: Date
    +estDisponible():Boolean
}

class "Section" as s{

    idSections: Integer
    nomSection: string
}

class "EmprunterLivres" as EL{

    -dateEmprunt:Date
}

class "RendreLivre" as RL{

    dateRenduPrevu:DateTime
    dateRenduReel:DateTime

    + enRetard():Boolean
}
class "Commiter" as c {

    idCommiter: Integer
    nomComiter : string
    nombreMax : integer
}

class "entreEnCharge" as EC{
    dateManipulation:DateTime
    motif:String

}

enum "etat" as e {
"neuf","legerement abimé", "catastrophique"
}
e <..l

p <|.. b
p <|.. a

b "*" -- "*" l: rendreLivre
(b,l) .. EC
a "*" -- "*" l: emprunterLivre
           (a,l) .. EL
a "*" -- "*" l: rendreLivre
(a,l) .. RL
l "1" -- "1..*" c :etreSujetDe
b "*" -- "*" l :etreEnCharge
l "1..*" -- "*"c: peutPrendre
s "*" -- "*"l: PossederLivre
l "1..*" -- "1..*"p :êtreAuteur

note right of l
Si un livre est sortie avant 1960 alors son identiant ne sera que sont idLivre
end note

note bottom of a
la date de rendu doit être obligatoirement fait après la date d'emprunt
end note

note top of RL
Si la dateRenduReel > dateRenduPrevu alors nombrePenalité augmente de 1
end note

note left of a
au bout d'un certains nombre de pénalité l'abonnée ne peut plus emprunté de livre
end note

note top of a
si le livre est trop abime alors l'abonnee sera sanctioner
end note

note bottom of a
un abonnee ne peut qu'emprunter au maximum 2 livres
end note

@enduml
