static void Main(string[] args) { Console.WriteLine("[Article]"); Article newArticle = new Article("PS5", 499.99); newArticle.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Livre]"); Article newLivre = new Livre("Harry Potter", 7.00, "978-3-16-148410-0", 900); newLivre.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Poche]"); Article newPoche = new Poche("Paroles", 5.00, "500-3-16-148410-0", 100, "Action"); newPoche.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Broche]"); Article newBroche = new Broche("Un livre au hasard", 5.00, "500-3-16-148410-0", 100); newBroche.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Disque]"); Disque newDisque = new Disque("Daft punk", 10.00, "Universal"); newDisque.ecouter(); newDisque.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Video]"); Video newVideo = new Video("Avengers", 15.00, "2 heures"); newVideo.afficher(); newDisque.acheter(); Console.WriteLine(Environment.NewLine + Environment.NewLine); }
static void Main(string[] args) { Console.WriteLine("[Article]"); Article newArticle = new Article("AR", 500.00); newArticle.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Livre]"); Article newLivre = new Livre("livreA", 5.00, "abc-hyhs-1235-0", 500); newLivre.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Poche]"); Article newPoche = new Poche("Paroles", 5.00, "500-3-16-148410-0", 100, "Title"); newPoche.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Broche]"); Article newBroche = new Broche("N'importe quel livre", 5.00, "abc-25jh-1235-0", 100); newBroche.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Disque]"); Disque newDisque = new Disque("Nom disque", 20.00, "Hello"); newDisque.ecouter(); newDisque.acheter(); Console.WriteLine(Environment.NewLine); Console.WriteLine("[Video]"); Video newVideo = new Video("video test", 15.00, "1 heures"); newVideo.afficher(); newDisque.acheter(); Console.WriteLine(Environment.NewLine + Environment.NewLine); }