联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2019-02-23 11:35

Sample Question 1

Based on the simplified UML Class diagram below, implement the specified classes and

associations. Note that the attributes and methods are not complete in the diagram. You need

to identify the instance variables and also provide a getter and setter method for each.

The required files are:

abstract_vehicle.py

car.py

truck.py

test_vehicle.py

Notes:

The get_details() method is an abstract method in the AbstractVehicle class.

Make sure to follow best practices for naming and documentation in your classes.

Your modules must successfully run.

The test_vehicle module is a Python script that generates the following output (i.e., get_details

method) from your four instances of your child classes when run:

Car: 2014 Toyota Camry in excellent condition with 50000 km.

Truck: 2018 Ford Explorer in fair condition with 5500 km.

Car: 2016 VW Jetta in perfect condition with 26100 km.

Truck: 1990 Ford Ranger in poor conditions with 350000 km.

AbstractVehicle

+ get_details() : string

Car

+ get_details() : string

Truck

+ get_details()

Sample Question 2

Based on the simplified UML Class diagram below, implement the specified classes and

associations. Note that the attributes and methods are not complete in the diagram. You need

to identify the instance variables and also provide a getter method for each (as appropriate).


The required files are:

school.py

student.py

test_script.py

Notes:

Make sure to follow best practices for naming and documentation in your classes.

Your modules must successfully run.

The test_script module is a Python script that generates the following output (i.e., print_details

method) from an instance of your School class when run:

The Computing School at BCIT has the following registered

students:

Bill Smith (Id: 101) graduating in Winter 2019

Susan Chang (Id: 201) graduating in Fall 2019

Sam Jones (Id: 155) graduating in Winter 2020

The Computing School at BCIT has the following registered

students:

Bill Smith (Id: 101) graduating in Winter 2019

Sam Jones (Id: 155) graduating in Winter 2020

The Computing School at BCIT has no registered students.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp