Page 1 of 1

In java!

Posted: Thu Jul 14, 2022 2:11 pm
by answerhappygod
In java!
In Java 1
In Java 1 (33.95 KiB) Viewed 28 times
In Java 2
In Java 2 (22.62 KiB) Viewed 28 times
- Implement a Main class: you must create a Main class that demonstrates the functionality of the TweetLoader methods. Your 'main' method of the Main class should use the 'loadAsArrayList' method to load the list of tweets stored from 'tweet_data.csv' in an ArrayList object. Moreover, it should use the 'LoadAsArray' method to load the list of tweets stored from 'tweet_data.csv' in an Array. It should then invoke the 'displayHead' and 'displayTail' methods to list to first n and last n entries respectively in each data structure. The Main class should also implement the following methods to print the content in the list: public static void printHead(ArrayList < Tweet > list, int n ) Display a list of the first n entries in the input ArrayList. public static void printHead(Tweet[] list) Display a list of the first n entries in the input Array. public static void printTail (ArrayList < Tweet > list) Display a list of the last n entries in the input ArrayList. public static void print Tail (Tweet[] list)