Permalink
Browse files

Remove price code now useless

  • Loading branch information...
rdeneau committed Aug 26, 2018
1 parent 2c285ab commit ff9d999ad30abf79112281f775fceb7ebb6800b6
@@ -2,7 +2,7 @@
{
public class ChildrenMovie : Movie
{
public ChildrenMovie(string title) : base(title, CHILDREN) { }
public ChildrenMovie(string title) : base(title) { }

public override decimal DetermineAmount(int daysRented)
{
@@ -2,17 +2,11 @@
{
public abstract class Movie
{
public const int REGULAR = 0;
public const int NEW_RELEASE = 1;
public const int CHILDREN = 2;

public int PriceCode { get; set; }
public string Title { get; }

public Movie(string title, int priceCode)
protected Movie(string title)
{
Title = title;
PriceCode = priceCode;
Title = title;
}

public abstract decimal DetermineAmount(int daysRented);
@@ -2,7 +2,7 @@
{
public class NewReleaseMovie : Movie
{
public NewReleaseMovie(string title) : base(title, NEW_RELEASE) { }
public NewReleaseMovie(string title) : base(title) { }

public override decimal DetermineAmount(int daysRented) =>
daysRented * 3;
@@ -2,7 +2,7 @@
{
public class RegularMovie : Movie
{
public RegularMovie(string title) : base(title, REGULAR) { }
public RegularMovie(string title) : base(title) { }

public override decimal DetermineAmount(int daysRented)
{

0 comments on commit ff9d999

Please sign in to comment.