Each input file will have the following format: number of games (blank line) game 1 name game 1 platforms (separated by commas) game 1 year (blank line) etc. with game 2, and for number of games total...


Need the following multiple methods in java to be used in a different class from the main class, uses an input txt file that has 45 games in the following format.


Each input file will have the following format:<br>number of games<br>(blank line)<br>game 1 name<br>game 1 platforms (separated by commas)<br>game 1 year<br>(blank line)<br>etc. with game 2, and for number of games total games<br>

Extracted text: Each input file will have the following format: number of games (blank line) game 1 name game 1 platforms (separated by commas) game 1 year (blank line) etc. with game 2, and for number of games total games
• public boolean matches Year(int y) – returns whether this game's year matches<br>y<br>• public boolean matchesPlatform(String p) – retums whether ANY of this<br>game's platforms matches p<br>• public boolean matchesName(String str) – returns whether this game's name<br>contains str. For example, if this game's name was

Extracted text: • public boolean matches Year(int y) – returns whether this game's year matches y • public boolean matchesPlatform(String p) – retums whether ANY of this game's platforms matches p • public boolean matchesName(String str) – returns whether this game's name contains str. For example, if this game's name was "Super Mario Odyssey" and str was "Mario", you should return true. I recommend using the String contains method.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here