Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi everyone. Could someone help me with this C++ assignment? I am stuck on this

ID: 3686752 • Letter: H

Question

Hi everyone. Could someone help me with this C++ assignment? I am stuck on this problem. I will appreciate it so much. Thankss!!

1- Given the following struct declaration:

int MAX_CHAR = 100;

Student

   id[MAX_CHAR];

   gpa;

Implement the following functions:

insertStudent(Student list[], int& sizeOfList, const Student& aStudent);

The above function inserts “” into “list” according to the order of id. “” should be ordered by student id. The function returns true if the operation is successful and false if a student with the same id exists.

removeStudent(Student list[], int& sizeOfList, const char id[]);

The above function removes the student object with “id” from “list.” It returns true if the operation is successful and false if the student doesn’t exist. The list should be ordered by student id at all time.

2- Write driver program and design test cases to test the functions.

Explanation / Answer

2.driver program

/ function example
#include <iostream>
using namespace std;


int f(int x, int y) // This is the FUNCTION you wrote
{
return x+y;
}

int main() // This is the DRIVER PROGRAM - it exercises f()
{
cout << "Sum of 3 and 14 is " << f(3,14) << endl;
cout << "Sum of 0 and -1 is " << f(0,-1) << endl;
cout << "Sum of 200 and 12000 is " << f(200, 12000) << endl;

system("pause");
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote