using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AbstractExam
{
public class Ok
{ }
public abstract class A : Ok
{
public abstract string Name { get; set; }
public abstract void Display();
public abstract void Move();
}
public class B : A
{
public override string Name
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public override void Display()
{
Console.WriteLine("화면에 보여준다.");
}
public override void Move()
{
Console.WriteLine("이동");
}
}
class Program
{
static void Main(string[] args)
{
B ok = new B();
ok.Display();
ok.Move();
}
}
} |