[Cs3] CS3 Lab 12: middle middle names and constant first name
Mikhail Nesterenko
mikhail at cs.kent.edu
Thu Apr 20 13:03:18 EDT 2023
>
> The way in which the directions of lab 12 are worded can make the output of the code supplied rather strange.
>
> Example output:
> NAME LIST
> Mary Smith
> Patricia Mary Johnson
> Michael William Johnson
> Barbara Patricia Mary Johnson
>
> Since the middle names are added into the firstName_ variable it can make the later generations have longer names which might not be the intended output.
>
I modified the lab description so specify that only the parents' first
name is to be used for the formation of the child middle name. So
Barbara above should be: Barbara Mary Johnson
However, since it was not clear in the description we would allow the
above solution also (the recursive middle names).
Also, for the name modification required in the lab, you need to make
the firstName_ in the Person class non-const.
Thank you,
--
Mikhail
More information about the cs3
mailing list