Students should be able to master the following C++ concepts: • Function • Array • Pointer • File • Struct Instruction: 1. Given the Tutorial1_Review.cpp, answer the questions given in the file....

Students should be able to master the following C++ concepts: • Function • Array • Pointer • File • Struct Instruction: 1. Given the Tutorial1_Review.cpp, answer the questions given in the file. Output for question 1 should be as follows: Name MidTerm Test Anwar 75 Desmond 80 Ajay 81 Salmah 88 Output for question 2 should be as follows: Name SBT1 SBT2 SBT3 Anwar 10 7 6 Desmond 6 7 8 Ajay 9 7 8 Salmah 10 6 7 Output for question 4 Name MidTerm Test SBT Marks Anwar 82 77 Desmond 87 70 Ajay 89 80 Salmah 95 77 2. Change the program so that the data can be read from the text file. 3. Define the struct that can store the whole student data.


#include #include using namespace std; // function prototype // the function prints the student names along with their Mid Term Test Marks. void print(string stud[], int midT[]); // the function print student names along with their Skill Based Test Marks void printSBT(string stud[], int SBTmark[],int SBtest[][]); // the function calculate total sbt marks by adding the whole marks divide by 30 and multiply 100 void calc_sbtMarks(int sbtM[], int SBTest[][]); // the function find the highest marks int highest(int marks[]); int main() { string students[] = {"Anwar", "Desmond", "Ajay", "Salmah"}; int midTestMark[] = {75, 80, 81, 88}; int SBTMark[4]; int SBtest[4][3] = { {10, 7, 6}, {6, 7, 8}, {9, 7, 8}, {10, 6, 7} }; // Write codes based on the following instructions // Question 1 - Call print function to print the student names along with their Mid Term Test Marks. // Question 2 - Call printSBT function to print student names along with their Skill Based Test Marks // Question 3 - Call calc_sbtMarks function to calculate the total sbt marks for each student // Question 4 - Write codes to print the student names along with their mid term marks and total sbt marks cout < "the="" highest="" marks="" for="" mid="" term="" test="" is="" "="">< highest(midtestmark);="" cout="">< "the="" highest="" marks="" for="" skill="" based="" test="" is="" "="">< highest(sbtmark); return 0; } // question 5 - write/define all 4 functions declared highest(sbtmark);="" return="" 0;="" }="" question="" 5="" -="" write/define="" all="" 4="" functions="">
Oct 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here