I have half of the code written but I cannot figure out how

I have half of the code written but I cannot figure out how to properly execute the Genre Report. Can someone help me alter my code???….ALSO…it is due by 9:00pm EST tonight (5/19) . Please help!!I provided the two inFiles and the two programs I have created. HERE ARE THE DIRECTIONS: You have been tasked with writing a program to keep track of the customer movie rentals stock for a (small) online retailer.For our purposes, tracking rentals and purchases will involve the interaction of Movies, Customers and Customer Activity.RequirementsDefine the class(es) necessary to represent the object(s) that comprise movie rental/purchase/streaming activity.Populate these object(s) with the data provided in the files specified in this document (also available in Canvas in Files > finalExam)Demonstrate that objects were populated by producing the specified output:Number of movies by MPAA rating: the number of movies for each MPAA rating and which rating has the most movies.  For example:Ratings Report G  10PG  5PG13  5R 13The majority of movies in inventory are rated RList of movies by genre: how many movies in each genre and the number of movies by MPAA rating for each genre.  For example:Genre Report ActionG  7PG  5PG-13  10What to turn in- The program(s) used to define your object(s)- The program(s) used to perform the construction/population of the object(s) and produces the output.EXTRA CREDIT #1  (10 pts)- Notice many of the movie titles contain an underscore (‘_’) character where the space should be.  In a separate method, convert the underscore back into a space when setting the movie title. EXTRA CREDIT #2  (15 pts)- Some movies titles begin with the word ‘The’.  For the sake of alphabetization, movies like this usually have the ‘The’ appended to the end of the name.  In a separate method, when setting the movie title, remove ‘The’ from the beginning of the movie title and append it to the end of the title.  So the movie title ‘The Great Escape’  becomes ‘Great Escape, The’.  NOTEExtra credit is all or nothing.  There is NO partial extra credit.  Make sure your program works BEFORE attempting any extra credit.  If unsuccessful when attempting the extra credit, DO NOT leave your program in a state where it does not compile or execute.  Remove the extra credit and make sure your program executes according to the assignment specifications.Here is the are the inFiles: finalData and FinalDataCategories MOVIE_ID TITLE REL_YEAR RUNTIME_MINS MPAA_RATING1 The_Jungle_Book 2016 106 PG2 Captain_America:_Civil_War 2016 147 PG-133 Batman_v_Superman:_Dawn_of_Justice 2016 151 PG-134 The_Huntsman:_Winter’s_War 2016 114 PG-135 The_Magnificent_Seven 2016 0 PG-136 Doctor_Strange 2016 0 PG-137 10_Cloverfield_Lane 2016 103 PG-138 Frozen 2013 102 PG9 The_Wolf_of_Wall_Street 2013 180 R10 Now_You_See_Me 2013 115 PG-1311 Man_of_Steel 2013 143 PG-1312 Ender’s_Game 2013 114 PG-1313 Star_Wars:_Episode_VII_-_The_Force_Awakens 2015 136 PG-1314 The_Hateful_Eight 2015 187 R15 Avengers:_Age_of_Ultron 2015 141 PG-1316 Creed 2015 133 PG-1317 Ant-Man 2015 117 PG-1318 Jurassic_World 2015 124 PG-1319 Inside_Out 2015 95 PG20 San_Andreas 2015 114 PG-1321 Concussion 2015 123 PG-1322 Spectre 2015 148 PG-1323 Guardians_of_The_Galaxy 2014 121 PG-1324 Captain_America:_The_Winter_Soldier 2014 136 PG-1325 Kingsman:_The_Secret_Service 2014 129 R26 Interstellar 2014 169 PG-1327 X-Men:_Days_of_Future_Past 2014 132 PG-1328 John_Wick 2014 101 R29 The_Equalizer 2014 132 R30 The_Amazing_Spider-Man_2 2014 142 PG-1331 Maleficent 2014 97 PG32 Birdman_(or_The_Unexpected_Virtue_of_Ignorance) 2014 119 R33 Neighbors 2014 97 R34 Transformers:_Age_of_Extinction 2014 165 PG-1335 The_Hobbit:_The_Battle_of_The_Five_Armies 2014 144 PG-1336 The_Lego_Movie 2014 100 PG37 The_Expendables_3 2014 126 R54 If_I_Stay 2014 107 PG-1338 How_to_Train_Your_Dragon_2 2014 102 PG39 Boyhood 2014 165 R40 Ride_Along 2014 99 PG-1341 Citizen_Kane 1941 119 NR43 The_Godfather 1972 175 R42 Casablanca 1942 102 PG44 Raging_Bull 1980 129 R45 Singin’_in_the_Rain 1952 103 NR46 Gone_With_the_Wind 1939 238 G47 Lawrence_of_Arabia 1962 216 PG48 Schindler’s_List 1993 195 R49 Vertigo 1958 128 PG50 The_Wizard_of_Oz 1939 102 NR51 City_Lights 1931 87 NR52 The_Searchers 1956 119 NR53 Star_Wars 1977 121 PGMOVIE_ID CATEGORY1 Adventure1 Drama1 Family1 Fantasy2 Action2 Adventure2 Sci-Fi3 Action3 Adventure3 Fantasy3 Sci-Fi4 Action4 Adventure4 Drama4 Fantasy5 Action5 Western6 Action6 Adventure6 Fantasy7 Drama7 Horror7 Mystery7 Sci-Fi7 Thriller8 Animation8 Adventure8 Comedy8 Family8 Fantasy8 Musical9 Biography9 Comedy9 Crime9 Drama10 Crime10 Mystery10 Thriller11 Action11 Adventure11 Fantasy11 Sci-Fi13 Action13 Adventure13 Fantasy13 Sci-Fi14 Crime14 Drama14 Mystery14 Thriller14 Western15 Action15 Adventure15 Sci-Fi12 Action12 Sci-Fi17 Action17 Adventure17 Comedy17 Sci-Fi18 Action18 Adventure18 Sci-Fi18 Thriller19 Animation19 Adventure19 Comedy19 Drama19 Family19 Fantasy20 Action20 Adventure20 Drama20 Thriller21 Biography21 Drama21 Sport22 Action22 Adventure22 Thriller23 Action23 Adventure23 Sci-Fi24 Action24 Adventure24 Sci-Fi25 Action25 Adventure25 Comedy25 Crime25 Thriller26 Adventure26 Drama26 Sci-Fi27 Action27 Adventure27 Sci-Fi27 Thriller28 Action28 Crime28 Thriller29 Action29 Crime29 Thriller16 Drama16 Sport 33 Comedy30 Action30 Adventure30 Fantasy30 Sci-Fi31 Action31 Adventure31 Family31 Fantasy31 Romance32 Comedy32 Drama34 Action34 Adventure34 Sci-Fi35 Adventure35 Fantasy36 Animation36 Action36 Adventure36 Comedy36 Family36 Fantasy37 Action37 Adventure37 Thriller54 Drama54 Fantasy54 Musical54 Romance38 Animation38 Action38 Adventure38 Comedy38 Family38 Fantasy40 Action40 Comedy40 Crime40 Romance41 Drama41 Mystery43 Crime43 Drama 42 Drama42 Romance42 War 44 Biography44 Drama44 Sport45 Comedy45 Musical45 Romance 46 Drama46 History46 Romance47 Adventure47 Biography47 Drama48 Biography48 Drama48 History49 Mystery49 Romance49 Thriller 51 Comedy51 Drama51 Romance 52 Action52 Drama52 Western53 Action53 Adventure53 Fantasy53 Sci-FiHere my program that defines the objectpackage edu.udel.misy225052016s.FINAL;import java.util.*;import java.io.*;public class Final {public static void main (String [] args)throws FileNotFoundException{Scanner inFile =new Scanner (new FileReader (‘F:misy22505216smisy22505216sfinalData.in’));Scanner categoryInFile =new Scanner (new FileReader (‘F:misy22505216smisy22505216sfinalDataCategories.in’));Vector v = new Vector ();do {//FinalDataCategoriesString MOVIE_ID  = categoryInFile.next();String CATEGORY  = categoryInFile.next();//FinalDataString dataMOVIE_ID  = inFile.next();String TITLE = inFile.next();String REL_YEAR  = inFile.next();String RUNTIME_MINS  = inFile.next();String MPAA_RATING  = inFile.next();//Create New MoviePopulateFinal movie = new PopulateFinal();//SET Vehicle Attributes  movie.setMOVIE_ID(MOVIE_ID);movie.setCATEGORY(CATEGORY);movie.setDataMovieID(dataMOVIE_ID);movie.setTitle(TITLE);movie.setRelYear(REL_YEAR);movie.setRunTime(RUNTIME_MINS);movie.setRating(MPAA_RATING);v.add(movie);}while (inFile.hasNext());System.out.println(); int i; // print the contents of the vectorfor (i = 0; i < v.size(); i++) {    System.out.println(v.get(i));    }    int gCount = 0;    int pgCount = 0;    int pg13Count = 0;    int rCount = 0;    int nrCount = 0;    for (int a = 0; a < 53; a++) {    switch (v.get(a).getRating()) {    case ‘G’:    gCount++;    break;    case ‘PG’:    pgCount++;    break;    case ‘PG-13’:    pg13Count++;    break;    case ‘R’:    rCount++;    break;    case ‘NR’:    nrCount++;    break;    }    }       System.out.println(‘Ratings Report: ‘);    System.out.println(‘G: ‘ + gCount);    System.out.println(‘PG: ‘ + pgCount);    System.out.println(‘PG-13: ‘ + pg13Count);    System.out.println(‘R: ‘ + rCount);    System.out.println(‘NR: ‘ + nrCount);       gCount = 0;    pgCount = 0;    pg13Count = 0;    rCount = 0;    nrCount = 0;         for (int a = 0; a < 53; a++) {    if(v.get(a).getCATEGORY() == ‘Action’) {    switch (v.get(a).getRating()) {    case ‘G’:    gCount++;    break;    case ‘PG’:    pgCount++;    break;    case ‘PG-13’:    pg13Count++;    break;    case ‘R’:    rCount++;    break;    case ‘NR’:    nrCount++;    break;        }    }    }    System.out.println(”);     System.out.println(‘Genre Report: ‘);    System.out.println(‘ACTION ‘ + ‘n G: ‘ + gCount + ‘n PG: ‘ +    pgCount + ‘n PG-13: ‘ + pg13Count + ‘n R: ‘ +    rCount + ‘n NR: ‘ + nrCount);     inFile.close();   }}Here program used to perform the construction/population of the objectspackage edu.udel.misy225052016s.FINAL;import java.util.*;public class PopulateFinal {// declare class variables//FinalDataCategoriesprivate String MOVIE_ID;privateString[] arrCATEGORY = new String [20];private String CATEGORY;//FinalData Fileprivate String dataMOVIE_ID;private String TITLE;privateString REL_YEAR;private String RUNTIME_MINS;private String MPAA_RATING;// constructor used to populate new moviepublic PopulateFinal() {init();}public PopulateFinal(String MOVIE_ID) {init();setMOVIE_ID(MOVIE_ID);}//declaring variables to be initializing at a later dateprivate void init() {//FinalDataCategories FileMOVIE_ID = null;CATEGORY = ”;//FinalData FiledataMOVIE_ID = null;TITLE = null;REL_YEAR = null;RUNTIME_MINS = null;MPAA_RATING = null;}public String getMOVIE_ID() {return MOVIE_ID;}public String getCATEGORY() {return Arrays.toString(arrCATEGORY).substring(1, Arrays.toString(arrCATEGORY).length()-1);}public void setMOVIE_ID(String MOVIE_ID) {this.MOVIE_ID = MOVIE_ID;}public void setCATEGORY(String val) {this.CATEGORY =this.CATEGORY + val + ‘&’;arrCATEGORY = CATEGORY.split(‘&’);}public void setDataMovieID (String dataMOVIE_ID) {this.dataMOVIE_ID = dataMOVIE_ID;}public String getDataMovieID() {return this.dataMOVIE_ID;}public void setTitle(String title) {this.TITLE = title;}public String getTitle() {return TITLE;}public void setRelYear(String relyear) {this.REL_YEAR = relyear;}public String getRelYear() {return REL_YEAR;}public void setRunTime(String runTime) {this.RUNTIME_MINS = runTime;}public String getRunTime() {return RUNTIME_MINS;}public void setRating(String rating) {this.MPAA_RATING = rating;}public String getRating() {return MPAA_RATING;}public String convertTitle() {return TITLE.replace(‘_’,’ ‘);}public String extraCred2() {String newTitle = ”;if (TITLE.startsWith(‘The’) == true) {newTitle = TITLE.substring(3);newTitle += ‘, The’;return newTitle;}elsereturn TITLE;}public String toString() {return //FinalDataCategories’MOVIE ID = ‘ + MOVIE_ID + ‘n’ +                ‘Category = ‘ + this.getCATEGORY() + ‘nn’ +’Movie ID = ‘ + dataMOVIE_ID + ‘n’ +’Title = ‘ + this.extraCred2() + ‘n’ +’Release Year = ‘ + REL_YEAR + ‘n’ +’Run Time Minutes = ‘ + RUNTIME_MINS + ‘n’ +’MPAA Ratings = ‘ + MPAA_RATING + ‘nn’; }}


Did you know you can hire someone to answer this question? Yes, classaider.com is a hub of paper writers dedicated to completing research and summaries, critical thinking tasks, essays, coursework, and other homework tasks. It is simple as ABC.