首页 > > 详细

辅导Java编程、SQL 程序调试、调试数据库编程、R设计解析、讲解Python程序

Truck stop
You are to finish the remaining classes for a truck delivery simulation.
How the simulation works:
Each truck will receive an itinerary list (list of depots) and will pick up and drop off
cargo from listed depots. Each depot will have cargo that contains a destination
depot. Each depot will place cargo onto a truck headed towards that destination,
assuming that truck has room, if it does not, the cargo remains at the depot.
You do not need to output anything to the terminal, the test file will do that.
We will be releasing a tricky test case on Thursday at 6pm.
The only classes you need to modify are: Truck, Depot and Cargo.
Cargo:
 Has a description
 Has a destination
 Can be held by a depot or truck (but not both!)
 (Optional) can specify if the cargo has been delivered
Depot:
 Has a name
 Allows trucks to dock at the depot and offload packages
 Will load cargo onto trucks that will be going to the cargo's destination.
 Will hold a large number of cargo items (You do not need to impose a limit)
Truck:
 Has a name
 Has a starting point and itinerary
 Has a capacity (how much cargo it can hold)
 Has a list of depots to visit to pick up and offload cargo.
 Will pick up cargo from a depot
 Will drop off cargo at a depot
 Once it has reached the last depot it will have finished its journey and
therefore stop
Your program will be checked against a simulation involving these classes,
assuming you have implemented it correctly. Each class provides comments as what
the method needs to do and return. It is advised that you test your classes.
You have been provided a simulation program and simple case that will process the
trucks. You may use this to get a bit of an idea of how it is processed.

 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!