Question: Write the inputLessons ( ) method in the Inventory class. Within inputLessons ( ) , use scnr to read pairs of inputs, string currTopic and
Write the inputLessons method in the Inventory class. Within inputLessons use scnr to read pairs of inputs, string currTopic and character currDiscount, until "stop" is read from input. Create each Lesson object with currTopic and currDiscount as arguments and append each object to ArrayList lessonList.
Ex: If the input is Housing N Marketing N Finance Y stop, then the output is:
Lesson: Housing, Discount: N Lesson: Marketing, Discount: N Lesson: Finance, Discount: Y
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
