UML Class diagram


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.

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
微信:codinghelp

转载于:https://www.cnblogs.com/mkfa/p/10432694.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值