Gweedar. He mentions that he knows of an additional system that we can implement that will make sorting our items much easier and more efficient for us, but requires some additional set-up that we must define. I don’t have the time to get this new system up and running, but I’ve written instructions for you to follow in order to implement this sy

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

As we continue to pillage and collect more items we are finding it much harder to sort them based different attributes. In order to aid in speeding up the process we have decided to talk to our typical fence for stolen items, Gweedar. He mentions that he knows of an additional system that we can implement that will make sorting our items much easier and more efficient for us, but requires some additional set-up that we must define. I don’t have the time to get this new system up and running, but I’ve written instructions for you to follow in order to implement this system while I am attending to other matters.

  • The item class must now implement the Comparable interface and override the compareTo() method. In the item class, you MUST use the value as your item to compare by.
  • You must now implement a second sort method that sorts based on your compareTo() methods. This can be done using Arrays.sort() or Collections.sort().
  • We must save and load to a file, at some point, throughout our program.
  • All inputs from the user must be verified for accuracy by catching exceptions for invalid inputs.
  • 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 Equipment, Consumable or Material. (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 up to 10 items, as long as they don’t exceed the maximum weight of the cargo bay, 25 Tons.
  • 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 the name and another on any attribute you choose).
  • We need to be able to sort items by their names alphabetically in order
  • We need to know how many of each item we have in our cargo bay and display their attributes.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Big Data Analytics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education