0% found this document useful (0 votes)
40 views

Created To Load Into Your Program

A space pirate seeks a way to streamline cargo inspections at space stations to reduce time wasted. They meet another pirate who suggests storing cargo in a file that can be read when needed, removing the need to repeatedly load and unload. The pirate details how to classify items into categories like weapons and consumables, track total item weights, search for and sort items, and get an inventory count with attributes. Implementing these changes will allow pirates to spend more time plundering.

Uploaded by

abdul hadi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Created To Load Into Your Program

A space pirate seeks a way to streamline cargo inspections at space stations to reduce time wasted. They meet another pirate who suggests storing cargo in a file that can be read when needed, removing the need to repeatedly load and unload. The pirate details how to classify items into categories like weapons and consumables, track total item weights, search for and sort items, and get an inventory count with attributes. Implementing these changes will allow pirates to spend more time plundering.

Uploaded by

abdul hadi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Each time we arrive at a station, we must unload our cargo into the station hold for inspection and

reload it back into our own ship’s cargo hold when we wish to leave. This is becoming very tedious and
taking away time that we could be plundering in space. We head into the station central to research a
way to eliminate this problem. We meet a fellow space pirate who has found a solution to the problem
we shared. We sit back and listen as he tells us how to find a workaround.

 We must now store our items in a file and read from the file if prompted by the user. You can
create a file with the list of items so you never have to type them in again, and you can control
the items that are introduced to our world.

 Items have attributes such as Name, Weight, Value, Durability and ID. (Create an object called
‘Item’, this class must be abstract to receive these points)

 We now classify our items by separating them into 3 distinct categories Equippable, Consumable
or Weapon. (You must implement these 3 classes that are subclasses of Item and they must
have at least 3 unique attributes in each subclass)

 We can carry an unlimited number of items, as long as they don’t exceed the maximum weight
of the cargo bay, 25 Tons. (Use an ArrayList that checks an item’s weight before placing it in the
cargo hold)

 We need to be able to add and remove items by their name.

 We need to be able to search for a specific type of item in our cargo bay based on the item’s
name and one of its attributes (Implement 2 searches – one on name and another on any
attribute you choose).

 We need to be able to sort items by their names alphabetically in order (A-Z)

 We need to be able to decode either the basic messages or advanced. Either one obtains full
credit.

 We need to know how many of each item we have in our cargo bay and display their attributes.

Note: With your submission of this assignment you must include all of your files AND your file that you
created to load into your program.

You might also like