Design ???????????? class and ???????????????????? class

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

 

 

Stressed over that homework?

Essay deadline breathing down your neck?

Let’s cut to the chase: Why struggle when you can ace it with zero hassle?

Whether it’s essays, research papers, or assignments — we’ve got you covered.

✅ Expert writers
✅ 100% original work
✅ No AI tools, just real pros

Stressed about your essay or homework? Get a top-quality custom essay NOW!!! Stop worrying. Start succeeding.

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2024 - GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top