CIS-251 “C++ Programming” Program #7 (Arrays and Vectors) 1) Using Visual Studio or your selected IDE, create a C++ prog
Posted: Sun Jul 03, 2022 11:23 am
CIS-251 “C++ Programming” Program #7 (Arrays and Vectors)
1) Using Visual Studio or your selected IDE, create a C++program solution for Chapter #7 Programming Challenges #21 “2DArray Operations” on page 461 of the textbook.
2) You must use good programming style as shown in the examplesin the textbook to include ample comments in your source code. Youmust include helpful information in a header block such as theprogram description, the source of your program, your name, and thedate.
3) Your program must use a 2-dimensional array of integers of 2rows and 5 columns. The first row must have the values 5, 10, 8, 7,and 3. The second row must have the values 4, 9, 6, 2, and 1.
4) You must input your data for the array from a file (e.g.“Program7.txt”). Note that you don’t need to specify a pathname toyour file if you put it in the same directory as your .cppfile.
5) You must create and use all 6 of the C++ functions specifiedin the textbook for this program. You must pass the argumentsspecified to your functions.
6) The getTotal, getRowTotal, getHighestInRow, andgetLowestInRow functions must be called for each of the 2 rowsindividually. The getColumnTotal function must be called for eachof the 5 columns individually.
7) You must determine and display the correct results for allrequired calculations using the specified array values in Step #3.All functions except getAverage should return integer results. ThegetAverage function should return a floating point result.
8) You must have only a single execution of your program. Do notrerun your program to test each function.
I have no clue how to do it. help needed, please and thank you!
Number Six is very important part, I don't know how to codethat. although , I have a code, and can't makeit run right.
I use visual studio 2022.
Output Snapshot-
It doesn't output anything, too many errors.
I either need help with fixing this code or a new code.
Array: 5 4 10 9 Total: 55 8 6 Row 1 Total : 33 Row 2 Total : 22 Highest in Row 1 : 10 Highest in Row 2 : 9 Lowest in Row 1 : 3 Lowest in Row 2 : 1 Column 1 Total : 9 Column 2 Total : 19 Column 3 Total: 14 Column 4 Total: 9 Column 5 Total: 4 Average: 5.5 12 7 2 3³ 1
[rror List ************** Entire Solution x 8 Errors ▲ 0 Warnings Code Description ⒸE1696 cannot open source fille "bits/stcch identifier "string" is undefined. identifier "ifstream" is undefined [0020 abc F0020 E0020 identifier "cout" is undefined 0020 identifier "endl" is undefined F0020 identifier "cout" is undefined abc F0020 identifier "endl" is undefined E0020 identifier "enidl" is undefined ● Int-uninit Local variable is not initialized. Frror list Output Type here to search 0 1 Message 97 Build+ IntelliSense 0 C n 92°F Sunny @ Project Chapter7 Chapter7 Chapter7 Chapter/ Chapter/ Chapter7 Chapter7 Chapter 7 Chapter 7 ***************** ▼ ♬ X x Search Frror list File Chapter7.cop Chapter7.cpp Chapter7.cpp Chapter/.cpp Chapter/.cpp Chapter7.cpp Chapter7.cpp Chapter 7.upp Chapter7.cpp ENG 3:29 PM 7/2/2022 Line 7 62 63 66 66 76 80 83 70 。.
1) Using Visual Studio or your selected IDE, create a C++program solution for Chapter #7 Programming Challenges #21 “2DArray Operations” on page 461 of the textbook.
2) You must use good programming style as shown in the examplesin the textbook to include ample comments in your source code. Youmust include helpful information in a header block such as theprogram description, the source of your program, your name, and thedate.
3) Your program must use a 2-dimensional array of integers of 2rows and 5 columns. The first row must have the values 5, 10, 8, 7,and 3. The second row must have the values 4, 9, 6, 2, and 1.
4) You must input your data for the array from a file (e.g.“Program7.txt”). Note that you don’t need to specify a pathname toyour file if you put it in the same directory as your .cppfile.
5) You must create and use all 6 of the C++ functions specifiedin the textbook for this program. You must pass the argumentsspecified to your functions.
6) The getTotal, getRowTotal, getHighestInRow, andgetLowestInRow functions must be called for each of the 2 rowsindividually. The getColumnTotal function must be called for eachof the 5 columns individually.
7) You must determine and display the correct results for allrequired calculations using the specified array values in Step #3.All functions except getAverage should return integer results. ThegetAverage function should return a floating point result.
8) You must have only a single execution of your program. Do notrerun your program to test each function.
I have no clue how to do it. help needed, please and thank you!
Number Six is very important part, I don't know how to codethat. although , I have a code, and can't makeit run right.
I use visual studio 2022.
Output Snapshot-
It doesn't output anything, too many errors.
I either need help with fixing this code or a new code.
Array: 5 4 10 9 Total: 55 8 6 Row 1 Total : 33 Row 2 Total : 22 Highest in Row 1 : 10 Highest in Row 2 : 9 Lowest in Row 1 : 3 Lowest in Row 2 : 1 Column 1 Total : 9 Column 2 Total : 19 Column 3 Total: 14 Column 4 Total: 9 Column 5 Total: 4 Average: 5.5 12 7 2 3³ 1
[rror List ************** Entire Solution x 8 Errors ▲ 0 Warnings Code Description ⒸE1696 cannot open source fille "bits/stcch identifier "string" is undefined. identifier "ifstream" is undefined [0020 abc F0020 E0020 identifier "cout" is undefined 0020 identifier "endl" is undefined F0020 identifier "cout" is undefined abc F0020 identifier "endl" is undefined E0020 identifier "enidl" is undefined ● Int-uninit Local variable is not initialized. Frror list Output Type here to search 0 1 Message 97 Build+ IntelliSense 0 C n 92°F Sunny @ Project Chapter7 Chapter7 Chapter7 Chapter/ Chapter/ Chapter7 Chapter7 Chapter 7 Chapter 7 ***************** ▼ ♬ X x Search Frror list File Chapter7.cop Chapter7.cpp Chapter7.cpp Chapter/.cpp Chapter/.cpp Chapter7.cpp Chapter7.cpp Chapter 7.upp Chapter7.cpp ENG 3:29 PM 7/2/2022 Line 7 62 63 66 66 76 80 83 70 。.