rewrite the indexing-based code in faculty.cpp with iterator-based code.

 the modification only in  faculty.h and faculty.cpp. don’t do any changes in the rest of the other files.

1- The declaration of the Faculty class has been changed, in the private area, to use a std::list instead of an array as its implementing data structure.

Your task is to follow through on that change, making the necessary alterations to faculty.h and faculty.cpp to make this a working class. The necessary changes have already been made to the unit tests, the Department class, and to the main printSchedule.cpp application.

2- The major difference between lists and the earlier sequential structures that we have looked at is that elements are accessed via iterators instead of integer-based indices. Accordingly, you will need to

a.  rewrite the indexing-based code in faculty.cpp with iterator-based code.

b.  Remove the indexing-based getSection function from faculty.h and add appropriate declarations of iterator and const_iterator types and associated functions allowing access to a Faculty object’s sections.

3- To improve the usability of the Faculty class, you will also need to add

a. A constructor to allow Faculty objects to be constructed from a course name and a pair of iterators denoting a range of Section values in some arbitrary container.

b. A constructor to allow Faculty objects to be constructed from a course name and an initializer_list of sections.

4- Your code will be evaluated both on its ability to function correctly within the printSchedule application and on its ability to pass the various unit tests provided.

· In the test report, tests 0…7 test the printSchedule application. Tests numbered 8…25 check the unit tests.

a. Each even-numbered test checks for correct behavior of the code.

b. Each odd-numbered test checks to see if that same behavior is correct and entails no memory leaks or other common pointer/memory handling problems.

  • attachment

    list_courseSched.zip

LOOKING FOR THIS ASSIGNMENT OR A SIMILAR ONE? WE HAVE HAD A GOOD SUCCESS RATE ON THIS PAPER! ORDER WITH US TODAY FOR QUALITY WORK AND GET A DISCOUNT!

ORDER NOW

Disclaimer:

All types of paper that Discount Writers provides is only for the purpose of assistance! No text, paper, assignment, discussion would be similar with another student therefore guaranteeing Uniqueness and can be used with proper references only!

More tools: Better Grades: Choose your Homework Help:

Assignment Help: We would write your papers according to the instructions provided and guarantee you timely work

 

Entire Online Class Help: We are here for you and we would do your entire Class work from discussions, assignments, Replies, Exams and Quizzes at a Cost

 

Exam/ Quiz Help: We have a team of writers who specialize on exams from any specific field and we would give you an A+ Grade!

 

ORDER NOW