C++ programming

profiledalamri_055
include.......docx

#include <iostream>

#include <string>

#include "studentList.h"

using namespace std;

int main()

{

studentList myStudents;

char moreStudents;

string fname, lname;

cout << "Get another student? : ";

cin >> moreStudents;

while(moreStudents == 'y' || moreStudents == 'Y'){

cout << "Give me another student to add: ";

cin >> myStudents;

cout << "Get another student? : ";

cin >> moreStudents;

}

cout << "Here are the students: " << endl << myStudents;

myStudents.reverseList();

cout << "Students in reverse: " << endl << myStudents;

myStudents.reverseList();

cout << "And once more from the top: " << endl << myStudents;

myStudents.insertionSort();

cout << "Here are the students sorted in ascending order by lname: " << endl << myStudents;

cout << "Any students want to drop? : ";

cin >> moreStudents;

while(moreStudents == 'y' || moreStudents == 'Y'){

cout << "Give me another student to drop: ";

cin >> fname >> lname;

if(!myStudents.removeStudent(lname,fname)){

cout << "No such student in list" << endl;

}

cout << "Here's who we have left: " << endl;

cout << myStudents;

cout << "Get another student? : ";

cin >> moreStudents;

}

cout << "Here's who we have left: " << endl;

cout << myStudents;

cout << "Goodbye!" << endl;

return 0;

}