Operating Systems Theory & Design : Java / NetBEANS

 

 I knew for this project I would need to create 2 classes. One that ran the inputs and printed data and another that would set values for return and initialize things. I began first with my networkEquipment.java file which I started by creating a public class utilizing a Comparable interface. This would be in use to create a total ordering on the objects of each class object or element. I needed to create a constructor to initialize each value or element. From here I established a method for retrieving and updating values of each variable using the same "Setters & Getters" from previous work. Next, I created string for return values ordering them in: name, gain, cost, and ROI. From here I simply utilized a Collections interface with sort or order the results. This would use the int values and order them based on the comparTo results from greatest to least. For my Main class file, I already planned on referencing LinkedList to the value established for networkEquipment. I used system input commands to have users enter the values and print them into the string networkEquitment, in the same order as noted above.  I ran both programs to ensure success. I looked into other items online like @Override which was when a class method is over-writing its base class method however it appears Apache NetBeans 11.3 can handle these types of exceptions automatically. This was a concern because when I ran the code in the older version on NetBeans a lot of errors were being thrown. From what I gather it was related to the class method unable to over-write its base class method. I ran out of ideas on how to solve and spent a lot of time looking for other examples of interfaces that worked so I could organize the return data.














Comments

Popular posts from this blog

Computer Language

One-Way Interview - About me

C++ Final Project