Question: Create a Java Eclipse Program with the following information provided. User Request: Create a simple program to read, store, and write publication data, using new

 Create a Java Eclipse Program with the following information provided. UserRequest: "Create a simple program to read, store, and write publication data,using new array library." Shisctivas. Description: This Homework builds on Homework 5

Create a Java Eclipse Program with the following information provided.

User Request: "Create a simple program to read, store, and write publication data, using new array library." Shisctivas. Description: This Homework builds on Homework 5 by requiring the use of additional object-oriented programming structures in Java. Note that Homework 5 required the use of at least two classes and override methods. Homework 6 requires the implementation to use a generic data structure with exception handling and other override methods. Other than these additional requirements, Ris 0.4 must satisfy all requirements of Ris 0.3. Operational Issues: From the user's perspective, Ris 0.4 will perform exactly the same as Ris 0.3. Implementation Issues: In contrast to the implementation requirements for Ris 0.3, which required the use of a specialized class to encapsulate the resizable array used to hold Publications data, Ris 0.4 requires that the class be generalized such that it could be used for resizable arrays of any type (generic type not just Publication). This is accomplished using generic types like . The class for this resizable array must be called MUArray. Note that each publication data will still be an object of class Publication, as in Homework 3. However, your MUArray resizable array class must be able to handle data of any type or any other object, not just of object Publication. Moreover, Ris 0.4 requires the creation of the following additional methods: 1. A method named addAt takes an item and an index as its parameters (in that order). It adds the item to the array at the location of the index, shifting other items by one place as necessary to make room in the array. 2. A method named replaceAt takes an item and an index as parameters (in that order) and replaces the item previously at the index given with the new item. 3. A method named removeAt takes an index as its parameter. It removes the item at that index from the array, shifting items by one index as necessary to fill the gap left in the array by the removal. 4. A method named remove takes a T type as its parameter. It removes all items equal to the parameter from the array, shifting items as necessary to fill the gap left in the array by the removal. Equality must be tested with the equals method, not with ==. All mutator methods that can increase or decrease the number of items in the array must resize the array as necessary - doubling or halving it as appropriate. Also, for all the methods that take index as a parameter, if the index given is outside the bounds of the filled portion of the array, the method should throw an exception. (If addAt is called with an index equal to the current number of items in the array, it should add the item at the end of the filled portion of the array without shifting any items.) You should thoroughly JUnit test all aspects of these classes. Note: when you test the remove method, ensure that you override the equals method in the Publication object to test the equality of DO because DO tag values are unique. You must use a good OOP style and documentation. You must follow Java conventions for compilation modules, including an interface file for constant variables, prototypes, etc., and a source (java) file for implementations of methods, etc. Note that the Java conventions are different for generic classes than for other classes-all definitions of methods of the generic class should go in the interface file, and there should be the corresponding implementation. You may write your program from scratch or start from programs for which the source code is freely available on the web or through other sources (such as friends or student organizations). If you do not start from scratch, you must give a complete and accurate accounting of where your code came from and indicate which parts are original or changed and which you got from which other source. Failure to give credit where credit is due is academic fraud and will be dealt with accordingly. public class Publication {// publication private Pair [] tagsAndValues; public Publication 0\{ tagsAndValues = new Pair[10] \}/getter and setter methods //increase size method for tagsAndValues to hold all ttagsand values //override toString method \} public class Pair {// tag and value pairs private String tag; private String value; public Pair 0\{ tag= null; value = null //getter and setter methods //override toString method 3 public class PublicationArray {// publication record // final static int for default size private int count; // to hold how many elements are in the array private Publication [] data; // to hold the publication records in an array public PublicationArray O{} public PublicationArray (int initialSize) } //add method to add elements // size() method to return how many publications in the array //other necessary method you think of 3 In addition to these specific requirements, you must carefully consider how to organize the data such that it is easy to manipulate (e.g., using looping constructs), easy to understand (by treating similar data in similar ways), and helps to preserve data integrity (e.g., by grouping related data together in structured ways)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!