/DogNames

Primary LanguageJava

PART 1 This part of the program prompts the user to enter a dog name and responds with the number of dogs registered with the same name. Here’s a sample run of the program: Enter a dog’s name? User types: Zoey Zoey is registered 23 times. PART 2 If the command line argument is 2, the program displays a list of all the dog names in alphabetical order. PART 3 If the command line argument is 3, the program presents two dog names from the data set and asks the player to guess which dog name is more popular. The program responds to the guess with either “Yes, that’s right.” or No and the correct answer. Then, the player is asked if they’d like to continue. If they respond “Y”, two new dog names are presented to them. When they decide to stop playing, a report of the number of correct guesses is given. Here’s a sample run of the program: Which name is more popular for Anchorage dogs? (Type 1 or 2)

  1. Bingley 2. Zoey User types: 1. Nope, the more popular dog name is Zoey. Do you want to play again? (Y/N) N You guessed correctly 0 out of 1 times.