Kizspy Question: 29
(Choose 1 answer)
pioventon.com
Which code snippet demonstrates abstraction using an abstract class?
A. abstract class Shape
{
}
public abstract void Draw();
class Circle Shape
public override void Draw()
Console.WriteLine("Drawing a circle");
class Program
{
{
static void Main(string[] args)
Shape shape = new Circle();
shape.Draw();
B. abstract class Shape
{
public void Draw()
Console.WriteLine("Drawing shape");
class Program
{
static void Main(string[] args)
{
}
Shape shape = new Circle();
shape.Draw();
C. class Shape
{
public virtual void Draw()
Console.WriteLine("Drawing shape");