use python Design the required class(es) so that the following expected output is generated. Do not change any given code. Your code should work for any number of arguments in the serverPassenger() method. # Write you code here fareChart = {"Bus":550, "Train":600} p1 = Passenger("Bob", "Bus Ticket",800) p2 = Passenger("Simon", "Train Ticket", 950) p3 = Passenger("David", "Train Ticket", 750) p4 = Passenger("Carol", 1500) print("1==============================") tc = TicketCounter() print("2==============================") tc.servePassenger(p1,fareChart) print("3==============================") tc.servePassenger(p2,fareChart) print("4==============================") tc.servePassenger(p3, p4, fareChart) print("5==============================") p4.buyTicket("Train Ticket") tc.servePassenger(p4,fareChart) print("6==============================") tc.showAllPassenger() Output: Bob is waiting for Bus having 800 taka in pocket. Simon is waiting for Train having 950 taka in pocket. David is waiting for Train having 750 taka in pocket. Carol has 1500 taka in pocket.Please buy a ticket. 1============================== This is a general bus and train ticket counter. 2============================== Bob has bought Bus ticket. 3============================== Simon has bought Train ticket. 4============================== David has bought Train ticket. Carol please buy a ticket first. 5============================== Carol has bought Train ticket. 6============================== Total passengers:4 Bus passengers:1 Passenger Name:Bob Remaining balance:250 Bus passengers:3 Passenger Name:Simon Remaining balance:350 Passenger Name:David Remaining balance:150 Passenger Name:Carol Remaining balance:900

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
# use python Design the required class(es) so that the following expected output is generated. Do not change any given code. Your code should work for any number of arguments in the serverPassenger() method. # Write you code here fareChart = {"Bus":550, "Train":600} p1 = Passenger("Bob", "Bus Ticket",800) p2 = Passenger("Simon", "Train Ticket", 950) p3 = Passenger("David", "Train Ticket", 750) p4 = Passenger("Carol", 1500) print("1==============================") tc = TicketCounter() print("2==============================") tc.servePassenger(p1,fareChart) print("3==============================") tc.servePassenger(p2,fareChart) print("4==============================") tc.servePassenger(p3, p4, fareChart) print("5==============================") p4.buyTicket("Train Ticket") tc.servePassenger(p4,fareChart) print("6==============================") tc.showAllPassenger() Output: Bob is waiting for Bus having 800 taka in pocket. Simon is waiting for Train having 950 taka in pocket. David is waiting for Train having 750 taka in pocket. Carol has 1500 taka in pocket.Please buy a ticket. 1============================== This is a general bus and train ticket counter. 2============================== Bob has bought Bus ticket. 3============================== Simon has bought Train ticket. 4============================== David has bought Train ticket. Carol please buy a ticket first. 5============================== Carol has bought Train ticket. 6============================== Total passengers:4 Bus passengers:1 Passenger Name:Bob Remaining balance:250 Bus passengers:3 Passenger Name:Simon Remaining balance:350 Passenger Name:David Remaining balance:150 Passenger Name:Carol Remaining balance:900
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY