In Java please!
- 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.
In Java please!
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
In Java please!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!