Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Code : Problem A: Birthdays again... ( this code most be written in C++, Thanks) Write a program that opens a file of the

C++ Code:

Problem A: Birthdays again... (this code most be written in C++, Thanks)

Write a program that opens a file of the users choice that contains a list of birthdays. Extract from this file two things: (1) the date with the most common birthday (all of them) and (2) the month with the most people born. We will not test for a tie in either of these statistics.

The file tested will always be in the format: mm/dd/yyyy

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sample birthday files:

bday1.txt

1/1/2013 1/1/2016 3/1/2456 3/2/7890 3/3/1948 

-------------------------------------------------------------------------------------------------------------------------------------------

bday2.txt

8/23/1956 3/28/1948 4/17/1995 3/11/1985 11/7/1972 2/14/1955 2/9/2005 1/11/1988 9/28/1993 9/3/1983 8/20/2012 11/28/1976 10/5/1997 10/17/1980 1/22/1999 7/30/1966 3/14/1950 2/6/1988 4/2/1946 9/4/1987 1/19/1948 8/11/1977 11/22/1957 12/2/1970 6/16/1967 8/1/1985 5/12/2016 5/5/1948 4/14/2012 8/2/1998 4/8/1945 9/2/2005 12/15/1995 7/23/2000 3/7/2013 3/3/1987 9/3/2011 10/29/2005 10/4/1962 3/3/1978 9/19/1961 5/15/1999 12/31/1971 6/28/1990 11/26/2001 7/13/1984 1/14/1946 11/6/1988 8/16/1966 8/30/2007 2/4/1987 7/15/1984 12/28/2008 9/21/1986 5/5/1965 2/3/1948 2/24/1969 2/12/1972 8/20/1992 5/26/1982 10/18/1993 11/26/2010 6/30/1952 8/13/2000 6/6/1967 8/31/1956 2/20/1989 1/17/1960 7/22/1976 2/25/1997 1/3/2005 8/24/1991 7/26/1962 7/2/1957 1/1/2010 11/11/1983 1/19/1948 4/3/1951 6/28/1988 8/2/1967 3/29/2011 11/2/1991 7/18/2002 4/20/1966 6/13/1958 5/15/1991 5/29/1956 5/12/1972 6/14/1955 10/8/1981 8/31/2002 11/20/1990 4/3/1965 7/27/1997 7/19/2009 4/7/1991 5/8/1946 1/6/1964 2/19/1994 11/29/1964 5/10/1965 

------------------------------------------------------------------------------------------------------------------

Example 1(user input is Italic):

Enter file name:

bday1.txt

Most common birthday:

1/1

Most common birthday month:

3

Example 2(user input is underlined):

Enter file name:

bday2.txt

Most common birthday:

8/15

Most common birthday month:

8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

- ive cashflow during development stage.

Answered: 1 week ago