JAVA Programming and Problem Solving
Seeking help for my study guide problem. Your task is to write a Java program that would represent an asset. Later on, you will be asked to extend this program and implement different types of assets as well as different types of applications and their relationship. As of now your program contain two classes: Asset Driver The former class, i.e. Asset, has to have the following attributes and methods: String Type. Can be one of the following: Server, Switch, Router, PSU (power supply unit), HDD, SSD, NIC (network interface card) int ID A unique number that identify any given asset. String Name General description of the asset including (if needed) vendor, hardware, model, etc. String serial Serial number of the asset which is a combination of characters usually found on a sticker affixed on some surface of the asset int PID Parent ID -- ID of the asset that appears to be "parent" to this one. For example Server asset is the "parent" of NIC asset because NIC is plugged into the server. In case when asset has no parent, this value has to be set to -1. "Getters" and "setters" for all attributes Default constructor (one that takes no parameters and uses default values of attributes) Method String toString() that returns textual presentation of an asset object. Values of all attributes must be used in compilation of that string. The latter class, i.e. Driver is used to host main() method that would instantiate a few objects of class Asset (use some illustrative cases like 1 server, 1 switch, 2 PSUs, 3 NICs, etc) and store references to those objects in an array. Then it would iterate through the array and for every asset it would print result returned by toString() method.