Page 1 of 1

In Java please!

Posted: Thu Jul 14, 2022 2:11 pm
by answerhappygod
In Java please!
In Java Please 1
In Java Please 1 (34.95 KiB) Viewed 38 times
In Java Please 2
In Java Please 2 (27.7 KiB) Viewed 38 times
- Implement a TweetLoader class. Implement a class with the name TweetLoader that will provide the implementation to the following static methods: public static ArrayList < Tweet > loadAsArrayList(String filename) public static Tweet[] loadAsArray (String filename) Both methods take as input a filename representing the dataset. The method must read all entries in the file, create a new instance of the Tweet object for every entry in the file and store in data structure. The 'loadAsArrayList' method should store all Tweet object as an ArrayList < Tweet > and returns the populated object. Similarly, the 'loadAsArray' method should store all Tweet object in an array (i.e. Tweet[]) and return it as its output. When implementing the loadAsArray method, you can assume that you do not know in advance the number of records in the file, so you must make sure you increase the size of the array as needed (i.e. double the size of the array if you reach its limit).
// end of TweetLoader class.