Question: Write the InputLessons ( ) function in the Collection class. Within InputLessons ( ) , use cin to read pairs of input, string currTopic and

Write the InputLessons() function in the Collection class. Within InputLessons(), use cin to read pairs of input, string currTopic and character currDiscount, until "completed" is read from input. Create each Lesson object with currTopic and currDiscount as arguments and append each object to vector lessonList.
Ex: If the input is Hobbies N Culture Y Fisheries Y Environment N completed, then the output is:
Lesson: Hobbies, Discount: N Lesson: Culture, Discount: Y Lesson: Fisheries, Discount: Y Lesson: Environment, Discount: N

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!