Write this program using an IDE. Comment and style the codeaccording to the CS 200 Style Guide. Submit the source code files(.java) below. Make sure your source files are encoded in UTF-8.Some strange compiler errors are due to the text encoding not beingcorrect.
Monster collector is a game of chance, where the user tries tocollect monsters by guessing the correct numbers between 1 and 5.If the user doesn't guess the incorrect number, you catch themonster, otherwise, it gets away!
Example output:
Welcome to Monster Collector, collect 2 monsters to win!A wild pikamoo appears! Guess a number between 1 and 55You almost had it, but the monster escaped.A wild bulbaroar appears! Guess a number between 1 and 51Congratulations, you caught bulbaroar!There are no more monsters to encounter!You caught 1 monsters of 2Keep training to be the very best!
Welcome to Monster Collector, collect 2 monsters to win!A wild pikamoo appears! Guess a number between 1 and 53Congratulations, you caught pikamoo!A wild bulbaroar appears! Guess a number between 1 and 51Congratulations, you caught bulbaroar!There are no more monsters to encounter!You caught 2 monsters of 2You're the monster collector master!
A more detailed explanation of the requirements for each methodwill be in the method header comments - please follow theseclosely. Suggested order of completion: getMonster(),catchMonster(), printResult() then main().
Config.java contains an array of monsters, and the seed for yourrandom number generator.