static void Main(string[] args) { Taxi taxi = new Taxi(); taxi.Drivername = "Jono "; taxi.OnDuty = true; taxi.NumPassenger = 10; taxi.TaxiInfo(); taxi.PickupPasengger(); taxi.DropOffPasengger(); Console.ReadKey(); }
static void Main(string[] args) { //membuat object taxi Taxi taxi = new Taxi(); //set nilai properties taxi.DriverName = "Joni"; taxi.OnDuty = true; taxi.NumPassenger = 10; //panggil method taxi.TaxiInfo(); taxi.PickUpPassenger(); taxi.DropOffPassenger(); Console.ReadKey(); }
static void Main(string[] args) { // membuat objek taxi dari class Taxi Taxi taxi = new Taxi(); // set nilai properties taxi.DriverName = "Verry"; taxi.OnDuty = true; taxi.NumPassenger = 10; // pemanggilan methods taxi.TaxiInfo(); taxi.PickUpPassenger(); taxi.DropOffPassenger(); Console.ReadKey(); }