java 3. Consider the FletNix and Episode classes partially defined as follows pu
ID: 3736268 • Letter: J
Question
java
3. Consider the FletNix and Episode classes partially defined as follows public class FletNix [ public HashMap> - s; // i.e., value of hashmap is a list (i.e., seasons) of lists of episodes public class Episode t public int length: //in minutes (e.g., a 42 minute episode) Key Value Inhumans Smallville The 4400 Season 1 Season 1 Season 2 Season 10 Season 1 Season 2 Season 4 E1 E2 EL E2 E1 E2 El E2 E1 E2 E1 E2 (a) [5 marks] Complete the totalSeriesTime(String name) method for the FletNix class that returns the total amount of minutes it would take to watch all episodes from all seasons for the tv series with the given input name (return 0 if show does not exist) public int totalSeriesTime (String name) tExplanation / Answer
public int totalSeriesTime(String name) { if(tvShows.containsKey(name)) { ArrayList tvshow = tvShows.get(name); int total = 0; for(int i = 0; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.