add Programmyday form github
This commit is contained in:
34
Warenkorb/DvDs.cs
Normal file
34
Warenkorb/DvDs.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Warenkorb
|
||||
{
|
||||
internal class DvDs : Article
|
||||
{
|
||||
private string filmTitle;
|
||||
private int duration;
|
||||
private string countryCode;
|
||||
private const double vat = 1.19;
|
||||
public DvDs(int articleNumber, double price, string filmTitle, int duration, string countryCode) : base(articleNumber, price)
|
||||
{
|
||||
this.filmTitle = filmTitle;
|
||||
this.duration = duration;
|
||||
this.countryCode = countryCode;
|
||||
}
|
||||
public override double GetPrice()
|
||||
{
|
||||
return base.GetPrice()*vat;
|
||||
}
|
||||
public override void PrintInfo()
|
||||
{
|
||||
base.PrintInfo();
|
||||
Console.WriteLine($"Brutto: {GetPrice():C2}");
|
||||
Console.WriteLine($"Film Titel: {this.filmTitle}");
|
||||
Console.WriteLine($"Spieldauer: {this.duration} min");
|
||||
Console.WriteLine($"LänderCode: {this.countryCode}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user