Design ???????????? class and ???????????????????? class which inherit ???????????????????????????????????? class so that the
following code provides the expected output.
????????????????: ???? ???????????????????????????????????? ???????????? ???????????????????? ???????????????? ???? ???????????????? ???????????? ????????????????. ???????? ???????????????? ???????????????? ???????? ???????????????????? ???????? ???????????? ???????????????????????? ???????? ???????????????? ???????? ???????????????????????????? ???? ???????????? ????. ???????????? ???????????????? ???????????????? ???????? ???????????????????? ???????? ???????????? ???????????????????????? ???????? ???????????????? ???????? ???????????????????????????? ???????????????? ????. “programming Language cse 111 [code must in python programming language]”
????????????????:
class Transport:
total_traveller = 0
def __init__(self, name, fare):
self.name = name
self.baseFare = fare
def __str__(self):
s = “Name: ”+self.name+”, Base fare: “+str(self.baseFare)
return s
# Write your codes here.
# Do not change the following lines of code.
t1 = Bus(“Volvo”, 950)
print(“=================================”)
t1.addPassengerWithBags(“David”, 6, “Mike”, 1, “Carol”, 3)
print(“=================================”)
print(t1)
print(“=================================”)
t2 = Train(“Silk City”, 850)
print(“=================================”)
t2.addPassengerWithBags(“Bob”, 2, “Simon”, 4)
print(“=================================”)
print(t2)
print(“=================================”)
print(“Total Passengers in Transport: ”, Transport.total_traveller )
????????????????????????:
Base-fare of Volvo is 950 Taka
===============================
===============================
Name: Volvo, Base fare: 950
Total Passenger(s): 3
Passenger details:
Name: David, Fare: 1055
Name: Mike, Fare: 950
Name: Carol, Fare: 1010
===============================
Base-fare of Silk City is 850 Taka
===============================
===============================
Name: Silk City, Base fare: 850
Total Passenger(s): 2
Passenger details:
Name: Bob, Fare: 850
Name: Simon, Fare: 910
===============================
Total Passengers in Transport: 5
Enjoy 24/7 customer support for any queries or concerns you have.
Phone: +1 213 3772458
Email: support@gradeessays.com