static void Main(string[] args) { /* * RapportModule MyRapportModule = new RapportModule(); * MyRapportModule.percentage = 65; * MyRapportModule.PrintGraad(); */ /* * Nummers paar1 = new Nummers(); * paar1.Getal1 = 12; * paar1.Getal2 = 34; * * Console.WriteLine("Paar:" + paar1.Getal1 + ", " + paar1.Getal2); * Console.WriteLine("Som = " + paar1.Som()); * Console.WriteLine("Verschil = " + paar1.Verschil()); * Console.WriteLine("Product = " + paar1.Product()); * Console.WriteLine("Quotient = " + paar1.Quotient()); */ /* * Student student1 = new Student(); * student1.WelkeKlas = Klassen.EA2; * student1.Leeftijd = 21; * student1.Naam = "Joske Vermeulen"; * student1.PuntenCommunicatie = 12; * student1.PuntenProgrammingPrinciples = 15; * student1.PuntenWebTech = 13; * * student1.GeefOverzicht(); */ /* * Pizza pizza1 = new Pizza(); * Console.WriteLine(pizza1.Diameter); * pizza1.Toppings = "appel"; * Console.WriteLine(pizza1.Toppings); * pizza1.Price = 20; * Console.WriteLine(pizza1.Price); */ /* * Basketballer basketBaller1 = new Basketballer(); * * basketBaller1.StelIn("Tim", 5, false, true, basketbalNiveaus.tweede); * basketBaller1.StelUEensVoor(); * basketBaller1.Shot(); * basketBaller1.Shot(); * basketBaller1.Shot(); * basketBaller1.Shot(); */ Basketballer.SimuleerWedstrijd(new Basketballer("Johny"), new Basketballer("Freddy")); /* * BankAccount rekening1 = new BankAccount(); * BankAccount rekening2 = new BankAccount(); * rekening1.Stort = 50; * rekening1.HaalAf = 5; * rekening1.SchrijfOver(20, rekening2); * Console.WriteLine($"rek1: {rekening1.CheckRekening}"); * Console.WriteLine($"rek2: {rekening2.CheckRekening}"); */ }
static public void SimuleerWedstrijd(Basketballer speler1, Basketballer speler2) { int result1 = speler1.Shot(); int result2 = speler2.Shot(); if (result1 != 2 && result2 != 2 || result1 == 2 && result2 == 2) { Console.WriteLine($"gelijkspel"); } else if (result1 == 2 && result2 != 2) { Console.WriteLine($"{speler1.naam} wint"); } else { Console.WriteLine($"{speler2.naam} wint"); } }
static public void SimuleerSpeler(Basketballer testspeler) { testspeler.Shot(); }