文件名称:c++实验代码
文件大小:3KB
文件格式:TXT
更新时间:2019-11-12 14:27:36
c++实验
Someone likes raising pets. Support the number of pets' rests is fixed.?//总数固定 Write a program and satisfy the demands as following: 4.1 A pet has a nest; 4.2 Someone can raise any kinds of pets and have any number of pets; 4.3 It can be printed the mounts of pets and the number of any kind of pets. // DON'T summit the answer of this question. There are different pricing methods according to different vehiecles. Write a program to calculate freight with demands as below: a) Define Vehicle class to unify the interface of pricing methods; b) There are formulas according to different vehiecles(weight is goods' weight): airplane costs = distance × 1.15 + weight × 1.05 shipping costs = distance × 1.05 + weight × 0.9 bus costs = distance × 1.2 + weight × 1.1 c) You could think over that in the future other vehiecles could be used to transport.