python code

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

python code

Post by answerhappygod »

python code
Python Code 1
Python Code 1 (39.56 KiB) Viewed 33 times
(20 points) Add necessary code so that, when we run the program, the following output is generated. Do not change the given code. All your code should be written in classes. Use polymorphism as much as possible. => => Istanbul => => BU, University => => ITU, University => => DSI, Highschool, German => GS, Highschool, French => Konya => Selcuk, University => => KAL, Highschool, English Distances: BU -> DSI = 10 Selcuk -> ITU = 50 ***** m = MAP(); L1 = m.add_location(CITY("Istanbul")); L5 = m.add_location(CITY("Konya")); L2 = m.add_location (University(L1, "BU")); L6 = m.add_location(University(L5, "Selcuk")); L3 = m.add_location (University(L1, "ITU")); 14 = m.add_location(Highschool(L1, "DSI", "German")); L7 = m.add_location(Highschool(L1, "GS", "French")); L8 = m.add_location (Highschool(L5, "KAL", "English")); m.set_distance(L2, L4, 10); m.set_distance(L6, L3, 50); m.print();
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply