diff --git a/src/main/java/com/mycompany/bibliotheque/Bibliotheque.java b/src/main/java/com/mycompany/bibliotheque/Bibliotheque.java deleted file mode 100644 index 6f7e419..0000000 --- a/src/main/java/com/mycompany/bibliotheque/Bibliotheque.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license - */ - -package com.mycompany.bibliotheque; - -/** - * - * @author dthev - */ - - -import java.util.Scanner; - -public class Bibliotheque { - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - Livre l1 = new Livre("1984", 10.0); - Utilisateur u1 = new Utilisateur("Alice"); - - System.out.println("Bienvenue dans la bibliothèque !"); - System.out.println("1. Afficher un livre"); - System.out.println("2. Emprunter un livre"); - System.out.println("Votre choix : "); - int choix = sc.nextInt(); - if (choix == 1) { - System.out.println("Livre : " + l1.getTitre()); - } else if (choix == 2) { - boolean ok = Emprunt.effectuerEmprunt(u1, l1); - System.out.println(ok ? "Emprunt réussi !" : "Échec de l'emprunt."); - } - } -} diff --git a/src/main/java/com/mycompany/bibliotheque/Contrôle/LivreValide.java b/src/main/java/com/mycompany/bibliotheque/Contrôle/LivreValide.java new file mode 100644 index 0000000..03a27a0 --- /dev/null +++ b/src/main/java/com/mycompany/bibliotheque/Contrôle/LivreValide.java @@ -0,0 +1,35 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package com.mycompany.bibliotheque.Contrôle; + +/** + * Classe de contrôle de la classe Livre + * @author dthev + */ +public class LivreValide { +// 1. ISBN : exactement 13 chiffres + public static boolean isValidIsbn(String isbn) { + // TODO: implémenter la validation + return false; + } + + // 2. Titre : pas de balises HTML/JS (