add Programmyday form github

This commit is contained in:
Ruben Kallinich
2024-07-25 15:47:46 +02:00
parent 09c8eab938
commit 7362c3d7ce
132 changed files with 3669 additions and 0 deletions

36
Warenkorb/Books.cs Normal file
View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Warenkorb
{
internal class Books : Article
{
private string author;
private string title;
private string yearOfPublishing;
private double vat = 1.07;
//Books(int articleNumber, double price,)
public Books(int articleNumber, double price, string author, string title, string yearOfPublishing) : base(articleNumber, price)
{
this.author = author;
this.title = title;
this.yearOfPublishing = yearOfPublishing;
}
public override double GetPrice()
{
return base.GetPrice()*vat;
}
public override void PrintInfo()
{
base.PrintInfo();
Console.WriteLine($"Brutto: {GetPrice():C2}");
Console.WriteLine($"Autor: {this.author}");
Console.WriteLine($"Titel: {this.title}");
Console.WriteLine($"Erscheinungsjahr: {this.yearOfPublishing}");
}
}
}