@Test public void testGetCharge() { assertEquals(0.0d, nrpc.getCharge(-5), tolerance); assertEquals(0.0d, nrpc.getCharge(0), tolerance); assertEquals(3.0d, nrpc.getCharge(1), tolerance); assertEquals(6.0d, nrpc.getCharge(2), tolerance); assertEquals(66.0d, nrpc.getCharge(22), tolerance); }
@Override public double getCharge(int daysRented) { if (daysRented > 0) { return daysRented * 3; } return 0.0d; }
NewReleasePriceCategory extends PriceCategory { @Override public double getCharge(int daysRented) { if (daysRented > 0) { return daysRented * 3; } return 0.0d; } }
NewReleasePriceCategory extends PriceCategory { @Override public double getCharge(int daysRented) { if (daysRented > 0) { return daysRented * 3; } return 0.0d; } private  NewReleasePriceCategory(); }
NewReleasePriceCategory extends PriceCategory { @Override public double getCharge(int daysRented) { if (daysRented > 0) { return daysRented * 3; } return 0.0d; } private  NewReleasePriceCategory(); int getId(); @Override double getCharge(int daysRented); @Override int getFrequentRenterPoints(int daysRented); @Override String toString(); static NewReleasePriceCategory getInstance(); }
NewReleasePriceCategory extends PriceCategory { @Override public double getCharge(int daysRented) { if (daysRented > 0) { return daysRented * 3; } return 0.0d; } private  NewReleasePriceCategory(); int getId(); @Override double getCharge(int daysRented); @Override int getFrequentRenterPoints(int daysRented); @Override String toString(); static NewReleasePriceCategory getInstance();  }