Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public class FamilyTariff implements TaxiTariff {
  2. private long price;
  3. @Override
  4. public long calculatePrice(TaxiRide ride) {
  5. price= 30 + (5 * ride.getDistance()) + (2 * ride.getDuration());
  6. return price;
  7. }
  8. public long getPrice() {
  9. return price;
  10. }
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement