1

I'm going write a transport container management system. A shipyard consists of containers, each heading to a destination and each container will contain transport packages. Each package has an owner, destination, weight, and a unique id tag. The id tag is chosen by the system not the user. Each time a transport item is placed in a container that is going to their destination, it must be placed so the lightest items are at the top of the container. transport containers require unique id numbers (chosen by the system, not the user!), have a capacity of 2000 lbs. and have a destination once any goods are placed in them . transport containers should be sorted so that the destinations are in alphabetical order, for easier train loading.

I must use link-based linked lists to implement the system, and I should organize my program into reasonable user-defined classes used by a main program. I should have a Shipyard class, a Container class, and a Package class. The Shipyard will have a linked-list of Containers, and each Container will have a linked-list of packages, so my overall data structure must be a linked-list of linked-lists.

I need some help because I have no idea should I need a class for node and where should I start for my code. Someone help me please!!

Timothy Su
  • 21
  • 1
  • I don't think you need a linked list here. [heapq](https://docs.python.org/3.6/library/heapq.html) will probably meet your needs. – jq170727 Oct 21 '17 at 06:45
  • But the question ask me to use linked list – Timothy Su Oct 21 '17 at 07:23
  • Insisting on a linked list implies memory is at a premium where you have to work with a lower-level language like C. Are you sure [tag:python] is correct? It doesn't make much sense to insist on a linked list if you're going to use python which has a good assortment of well-working higher level containers (like the heapq I mentioned). – jq170727 Oct 21 '17 at 18:58
  • I'm very sure that python is correct – Timothy Su Oct 21 '17 at 22:40
  • Then perhaps this answer will help you: [Python Linked List](https://stackoverflow.com/questions/280243/python-linked-list). good luck. – jq170727 Oct 22 '17 at 00:20

0 Answers0