Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FamilyTariff implements TaxiTariff {
- private long price;
- @Override
- public long calculatePrice(TaxiRide ride) {
- price= 30 + (5 * ride.getDistance()) + (2 * ride.getDuration());
- return price;
- }
- public long getPrice() {
- return price;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement