static void Main(string[] args) { /* * La relation d~heirtage * * Mechanisme fondamental de POO * * * Ex compte (Cheque, Epargne) * * Epargne interet a largent * * Cheque pas interet * * * public class CompteEpargne : Compte * * C& CLASS * * * protected for derivated classes */ var clienttest = new ClientC6("Bozo", "LeClown", 180088888888); var test = new CompteEpargneC6note(clienttest, 0.01); }
//constructor public CompteC6(ClientC6 clientC6) { this._clientC6 = clientC6; _solde = 0; _compteClientId = CompteNumIdIncrement; CompteNumIdIncrement++; }
// Methodes Daffichages private static void AfficherClient(ClientC6 clientC6) { Console.WriteLine($"User ID : {clientC6.Id}\n" + $"Nom : {clientC6.Nom}\n" + $"Prenom : {clientC6.Prenom}\n" + $"Telephone : {clientC6.Tel}\n"); }
private static void test() { var usager1 = new ClientC6("Escobar", "Pablo", 18005558888); var usager2 = new ClientC6("Trump", "Donald", 18003335555); var comptePab = new CompteC6(usager1); var compteDon = new CompteC6(usager2); Console.WriteLine("Test d'affichage press enter"); Console.ReadLine(); Console.Clear(); AfficherCompte(comptePab); AfficherCompte(compteDon); GetNumberAccountsCreated(); Console.WriteLine("Test de Ajout au compteC6 press enter"); Console.ReadLine(); compteDon.Crediter(50000.33); comptePab.Crediter(53000.11); AfficherCompte(comptePab); AfficherCompte(compteDon); Console.WriteLine("Test de Transfers press enter\n" + "Debite Don 14000"); Console.ReadLine(); compteDon.Debiter(comptePab, 14000.12); AfficherCompte(comptePab); AfficherCompte(compteDon); Console.WriteLine("Test de Transfers press enter \n" + "Credite Pablo"); Console.ReadLine(); comptePab.Crediter(compteDon, 12000.11); AfficherCompte(comptePab); AfficherCompte(compteDon); Console.WriteLine("Test de Nombre de Comptes press enter"); Console.ReadLine(); GetNumberAccountsCreated(); Console.ReadLine(); }
public CompteEpargneC6note(ClientC6 clientC6, double _tauxinteret) : base(clientC6) { this._tauxinteret = _tauxinteret; }
public CompteChequeC6note(ClientC6 clientC6, int _nombreOperations) : base(clientC6) //utilise le Client seter de base CompteC6 { this._nombreOperations = _nombreOperations; }