Question
THIS QUESION IS FOR JAVA PROGRAMMER!! Each stop at a space station usually means that we have to unload and reload our cargo bay. Each
THIS QUESION IS FOR JAVA PROGRAMMER!!
Each stop at a space station usually means that we have to unload and reload our cargo bay. 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 ships 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)
We now classify our items by separating them into 3 distinct categories Equipable, 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 dont exceed the maximum weight of the cargo bay, 25 Tons. (Use an ArrayList that checks an items 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 items 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 descending order (A-Z)
We need to know how many of each item we have in our cargo bay and display their attributes.
We must also add a partial search (think of this as a filter option).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started