//code for using abstract class and in heritance
using System;
namespace OOPSProj
{//source code for inheritance
class AbstractChild : AbstractParent
{
public override void Mul1(int x, int y)
{
Console.WriteLine(x * y);
}
public override void Div1(int x, int y)
{
Console.WriteLine(x / y);
}
public void show9()
{
Console.WriteLine("hello");
}
static void Main()
{
AbsChild obj = new AbsChild();
AbsParent p = obj;
p.Add(100, 50); p.Sub(350, 45);
p.Mul(245, 35); p.Div(180, 30);
Console.ReadLine();
}
}
}
No comments:
Post a Comment