Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Abstract Class
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Person person = new Evan(); person.Eat("Pork"); person.Talk("Hey their"); person = new Bob(); person.Eat("Chicken"); person.Run(10.3f); /* output: Evan is eating Pork Evan: Hey their Bob is eating Chicken Bob is running at: 10,3 MPH */ } } public class Evan : Person { public override void Eat(string food) { Console.WriteLine("Evan is eating {0}", food); } public override void Run(float speed) { Console.WriteLine("Evan is running at: {0} MPH", speed); } public override void Talk(string text) { Console.WriteLine("Evan: {0}", text); } } public class Bob : Person { public override void Eat(string food) { Console.WriteLine("Bob is eating {0}", food); } public override void Run(float speed) { Console.WriteLine("Bob is running at: {0} MPH", speed); } public override void Talk(string text) { Console.WriteLine("Bob: {0}", text); } } public abstract class Person { public abstract void Eat(string food); public abstract void Run(float speed); public abstract void Talk(string text); } }
run
|
edit
|
history
|
help
0
⁸
Liczba powtórzająca
lookup test
Test equality
ok
sfdcsddxasdxsd
A2Z Dice Roll
abebe
test
Find X numbers of 6 in row (dices)