Chartlins is a company that specialises in providing electronic components for hobbyists to build simple electronic circuits of their
own design, or from a kit of parts. They have hired you to write a system to manage their inventory of components etc. The
program must be written in the Java programming language and demonstrate the use of classes and object-oriented design to
write modular, maintainable programs. The file inventory. txt, available via black-board, provides details of the company’s
inventory of electronic components (resistors, ca- pacitors, diodes, transistors and integrated circuits). For each stock item, the
file provides the component type, the stock code, the number of items in stock and the unit price in pence. The remainder of the
record provides some addifional informafion:
• Resistors — the resistance in Ohms (see en.wikipedia.org/wiki/RKM_code).
• Capacitors — the capacitance in Farads, encoded in a manner similar to resistance.
• Diodes — no addifional informafion.
• Transistors — an indicafion whether theyare NPN, PNP or FET devices.
• Integrated Circuits (ICs) — a brief descripfion.
The program must read the data in this file into memory, stored in an appropriate set of objects, and print
answers to the following queries on the console:
• Print a list of the inventory, sorted in decreasing order of the number of items in stock.
• What is the component with the smallest number of components in stock?
• How many PNP transistors does Chartlins have in stock?
• What is the total capacitance of all of the capacitors in stock?
• How many stock items have more than ten in stock?
The program should consist of three files, which define the basis of the marking scheme:
• StockItem. java, which should definea class that records the informafion about a stock item.