You are given the following two dimensional arrays of people and their birth months: String [][] people = {{June, May, March, June, May, March, February, June, May, January, May, March}, {John, Mary, Peter, Bob, Sam, Dan, Judith, Gary, Tiff, Suzy, Jim, Jane}} 1) Create an enum type for the the first six months of the year 2) Randomly select a month from this enum 3) Loop through the array of people and make a list of all the people whose birthdays correspond to the month that was randomly chosen above. I ONLY NEED THE ANSWERS TO 2 AND 3. Please provide the code

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.4: Arrays As Arguments
Problem 6E: (Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current,...
icon
Related questions
Question

You are given the following two dimensional arrays of people and their birth months:

String [][] people = {{June, May, March, June, May, March, February, June, May, January, May, March}, {John, Mary, Peter, Bob, Sam, Dan, Judith, Gary, Tiff, Suzy, Jim, Jane}}

1) Create an enum type for the the first six months of the year

2) Randomly select a month from this enum

3) Loop through the array of people and make a list of all the people whose birthdays correspond to the month that was randomly chosen above.

I ONLY NEED THE ANSWERS TO 2 AND 3. Please provide the code 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

When I type in the code for the 3rd question this line is highlighted

 if (people[i][j] == first){

the error says "incomparable types: String and month". Do you have any idea why I might be getting this error?

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,