[Cs3] CS 3 - Lab 5

Mikhail Nesterenko mikhail at cs.kent.edu
Mon Sep 24 08:44:56 EDT 2018


> 
> For Lab 4, the private member variables of the Student class were two
> strings: one string for the first name and one string for the last name,
> AND the third member variable was a list of strings that were to be used
> for the courses the student was enrolled in.
> 
> However for Lab 5, our map uses a Student object for a key and a list of
> strings for a value. The value is to be the list of courses that the
> student is enrolled in currently.
> 
> So for Lab 5 then, will I be removing the list of string private member
> variable from the class Student and not using it anymore because of the
> value for the map is now a list of strings? It makes sense to but I just
> want a confirmation to make sure I am doing it right.

Yes, this is the idea: in the second part of lab 4, the object was to
hold both names and classesl; in lab 5, the object holds names only
and serves as the key, while the classes is the payload.

thanks,
--
Mikhail


More information about the cs3 mailing list