35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
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}");
|
|
}
|
|
}
|
|
}
|