Write this program using an IDE. Comment and style the code according to the CS 200...

90.2K

Verified Solution

Question

Programming

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.

Answer & Explanation Solved by verified expert
4.3 Ratings (515 Votes)
Implementation in JAVA import scanner classimport javautilScannerclass configjavapublic class Config main method public static void mainString args Systemoutprintln String monster array String monster wildbulbaroaWerewolf Maskwild pikamooGiantSquidChupacabra generating random numbers inrange of 1 to 5 num is number of cases int num int Mathrandom 5 1 1 1 SystemoutprintlnWelcome toMonster collector collect num    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students