Added everything from Kalmar
This commit is contained in:
50
20231129/ConsoleApp1/Program.cs
Normal file
50
20231129/ConsoleApp1/Program.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
public class Alak
|
||||
{
|
||||
public virtual void Rajzol() {
|
||||
Console.WriteLine("Alakzat rajzolása.");
|
||||
}
|
||||
}
|
||||
|
||||
public class Kor : Alak
|
||||
{
|
||||
public override void Rajzol()
|
||||
{
|
||||
Console.WriteLine("Kör rajzolása.");
|
||||
}
|
||||
}
|
||||
|
||||
public class Kocka : Alak
|
||||
{
|
||||
public override void Rajzol()
|
||||
{
|
||||
Console.WriteLine("Téglalap rajzolása.");
|
||||
|
||||
Console.WriteLine(" .+------+ +------+ ");
|
||||
Console.WriteLine(" .' | .' | /| /| ");
|
||||
Console.WriteLine("+---+--+' | +-+----+ | ");
|
||||
Console.WriteLine("| | | | | | | | ");
|
||||
Console.WriteLine("| ,+--+---+ | +----+-+ ");
|
||||
Console.WriteLine("|.' | .' |/ |/ ");
|
||||
Console.WriteLine("+------+' +------+ ");
|
||||
}
|
||||
}
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Alak haromszog = new Alak();
|
||||
haromszog.Rajzol();
|
||||
Kocka teglalap = new Kocka();
|
||||
teglalap.Rajzol();
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user