public static void Main(string[] args) { Compte C1 = new Compte(new Client("1234", "lapeze", "Alexis", "0615151515")); C1.afficher(); Console.WriteLine("\non crédite 100 €\n"); C1.crediter(100); C1.afficher(); Console.Out.Write("\non debite 37 \n"); C1.debiter(37); C1.afficher(); Compte C2 = new Compte(new Client("4321", "desrosiers", "loic", "0612121212")); C2.afficher(); Console.Out.WriteLine("\non credite le compte 2 à partir du compte 1\n"); C2.crediter(50, C1); C2.afficher(); Console.Out.WriteLine("\non débite le compte 1 et on crédite le compte 2\n"); C1.debiter(70, C2); C1.afficher(); C2.afficher(); Compte.Nombre_Comptes(); Console.WriteLine("\nCréation des Articles : \n"); Article A1 = new Article(); Article A2 = new Article("1234", "ceci est mon deuxieme article"); Article A3 = new Article(A2); A3.Reference = "4321"; A3.Designation = "ceci est mon troisieme article"; Article A4 = new Article("5678", "ceci est mon quatrieme article", 150, 20); Console.WriteLine(A1.Reference + " " + A1.Designation + " " + A1.PrixHT + " " + A1.TauxTVA); Console.WriteLine(A2.Reference + " " + A2.Designation + " " + A2.PrixHT + " " + A2.TauxTVA); Console.WriteLine(A3.Reference + " " + A3.Designation + " " + A3.PrixHT + " " + A3.TauxTVA); Console.WriteLine(A4.Reference + " " + A4.Designation + " " + A4.PrixHT + " " + A4.TauxTVA); A4.CalculerPrixTTC(); Article2 A5 = new Article2("9876", "ceci est mon cinquieme article", 200); A5.CalculerPrixTTC(); Boucles.Entre(); }
public Article2(Article2 article) { reference = article.reference; designation = article.designation; prixHt = article.prixHt; }