@Test public void testGetFrequentRenterPoints() { assertEquals(0, nrpc.getFrequentRenterPoints(-3)); assertEquals(0, nrpc.getFrequentRenterPoints(0)); assertEquals(1, nrpc.getFrequentRenterPoints(1)); assertEquals(2, nrpc.getFrequentRenterPoints(2)); assertEquals(2, nrpc.getFrequentRenterPoints(50)); }
@Override public int getFrequentRenterPoints(int daysRented) { int result = 0; if (daysRented > 0) { if (daysRented == 1) { result = 1; } else { result = 2; } } return result; }
NewReleasePriceCategory extends PriceCategory { @Override public int getFrequentRenterPoints(int daysRented) { int result = 0; if (daysRented > 0) { if (daysRented == 1) { result = 1; } else { result = 2; } } return result; } }
NewReleasePriceCategory extends PriceCategory { @Override public int getFrequentRenterPoints(int daysRented) { int result = 0; if (daysRented > 0) { if (daysRented == 1) { result = 1; } else { result = 2; } } return result; } private  NewReleasePriceCategory(); }
NewReleasePriceCategory extends PriceCategory { @Override public int getFrequentRenterPoints(int daysRented) { int result = 0; if (daysRented > 0) { if (daysRented == 1) { result = 1; } else { result = 2; } } return result; } 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 int getFrequentRenterPoints(int daysRented) { int result = 0; if (daysRented > 0) { if (daysRented == 1) { result = 1; } else { result = 2; } } return result; } private  NewReleasePriceCategory(); int getId(); @Override double getCharge(int daysRented); @Override int getFrequentRenterPoints(int daysRented); @Override String toString(); static NewReleasePriceCategory getInstance();  }