Example #1
0
def main():
    silvertaxi = SilverServiceTaxi("SST1", 200, 2)
    print(silvertaxi)

    silvertaxi.drive(18)
    print(silvertaxi)
    print("The current fare is {:.2f}".format(silvertaxi.get_fare()))
    silvertaxi.start_fare()
Example #2
0
def main():
    """Test taxi (car subclass) features"""

    new_fancy_taxi = SilverServiceTaxi("Hummer", 100, 2)
    new_fancy_taxi.drive(18)
    print(new_fancy_taxi.get_fare())
    print(new_fancy_taxi)
    new_fancy_taxi.start_fare()
    new_fancy_taxi.drive(100)
    print(new_fancy_taxi)
def main():
    my_silverservice = SilverServiceTaxi('Hummer', 200, 4)
    print(my_silverservice)
    my_silverservice.start_fare()
    my_silverservice.drive(100)
    print(my_silverservice.get_fare())
    print(my_silverservice)

    test_silverservice = SilverServiceTaxi('Lotus', 100, 2)
    print(test_silverservice)
    test_silverservice.start_fare()
    test_silverservice.drive(18)
    print(test_silverservice.get_fare())
    print(test_silverservice)
Example #4
0
from Prac_08.silver_service_taxi import SilverServiceTaxi

new_ride = SilverServiceTaxi("Hummer", 100, 2)
new_ride.start_fare()
new_ride.drive(18)
new_ride.get_fare()
print(new_ride.__str__())
print(new_ride.get_fare())