Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ 1. Write and execute a program in C++ that demonstrates what happens when one has an array one-off error in a program and when

C++

1. Write and execute a program in C++ that demonstrates what happens when one has an array one-off error in a program and when one has an array out-of-bounds error in your program. In your submission for this problem, in addition to source code, write a short summary of what your program did upon execution and why you think it behaved as it did.

Use the contents of the file below. They are organized by row with the name of the team, year, wins, losses, and ties. Each item on a line is separated by one or more spaces. Write a C++ program uses parallel arrays that reads that data from file, computes the total wins and losses for each team, and displays a total win/loss percentage for each team.

School Year Won Loss Tie Alabama 1958 5 4 1 Alabama 1959 7 2 2 Alabama 1960 8 1 2 Alabama 1961 11 0 0 Alabama 1962 10 1 0 Alabama 1963 9 2 0 Alabama 1964 10 1 0 Alabama 1965 9 1 0 Alabama 1966 11 0 0 Alabama 1967 8 2 0 Alabama 1968 8 3 0 Alabama 1969 6 5 0 Alabama 1970 6 5 1 Alabama 1971 11 1 0 Alabama 1972 10 2 0 Alabama 1973 11 1 0 Alabama 1974 11 1 0 Alabama 1975 11 1 0 Alabama 1976 9 3 0 Alabama 1977 11 1 0 Alabama 1978 11 1 0 Alabama 1979 12 0 0 Alabama 1980 10 2 0 Alabama 1981 9 2 1 Alabama 1982 8 4 0 Alabama 1983 8 4 0 Alabama 1984 5 6 0 Alabama 1985 9 2 1 Alabama 1986 10 3 0 Alabama 1987 7 5 0 Alabama 1988 9 3 0 Alabama 1989 10 2 0 Alabama 1990 7 5 0 Alabama 1991 11 1 0 Alabama 1992 13 0 0 Alabama 1993 12 0 0 Alabama 1994 12 1 0 Alabama 1995 3 0 0 Alabama 1996 10 3 0 Alabama 1997 11 0 Alabama 1998 4 7 0 Alabama 1999 7 5 0 Alabama 2000 10 3 0 Alabama 2001 3 8 0 Alabama 2002 7 5 0 Alabama 2003 10 3 0 Alabama 2004 6 6 0 Alabama 2005 10 1 0 Alabama 2006 6 7 0 Alabama 2007 2 6 0 Alabama 2008 12 2 0 Alabama 2009 14 0 0 Alabama 2010 10 3 0 Alabama 2011 12 1 0 Alabama 2012 13 1 0 Alabama 2013 11 2 0 Alabama 2014 12 2 0 Alabama 2015 14 1 0 Alabama 2016 14 1 0 auburn 1958 9 0 1 auburn 1959 7 3 0 auburn 1960 8 2 0 auburn 1961 6 4 0 auburn 1962 6 3 1 auburn 1963 9 2 0 auburn 1964 6 4 0 auburn 1965 5 5 1 auburn 1966 4 6 0 auburn 1967 6 4 0 auburn 1968 7 4 0 auburn 1969 8 3 0 auburn 1970 9 2 0 auburn 1971 9 2 0 auburn 1972 10 1 0 auburn 1973 6 6 0 auburn 1974 10 2 0 auburn 1975 4 6 1 auburn 1976 4 7 0 auburn 1977 6 5 0 auburn 1978 6 4 1 auburn 1979 8 3 0 auburn 1980 5 6 0 auburn 1981 5 6 0 auburn 1982 9 3 0 auburn 1983 11 1 0 auburn 1984 9 4 0 auburn 1985 8 4 0 auburn 1986 10 2 0 auburn 1987 9 1 2 auburn 1988 10 2 0 auburn 1989 10 2 0 auburn 1990 8 3 1 auburn 1991 5 6 0 auburn 1992 5 5 1 auburn 1993 11 0 0 auburn 1994 9 1 1 auburn 1995 8 4 0 auburn 1996 8 4 0 auburn 1997 10 3 0 auburn 1998 3 8 0 auburn 1999 5 6 0 auburn 2000 9 4 0 auburn 2001 7 5 0 auburn 2002 9 4 0 auburn 2003 8 5 0 auburn 2004 13 0 0 auburn 2005 9 3 0 auburn 2006 11 2 0 auburn 2007 9 4 0 auburn 2008 5 7 0 auburn 2009 8 5 0 auburn 2010 14 0 0 auburn 2011 8 5 0 auburn 2012 3 9 0 auburn 2013 12 2 0 auburn 2014 8 5 0 auburn 2015 7 6 0 auburn 2016 8 5 0

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

What was Friedman's view about environmental protection?

Answered: 1 week ago