Question: Repeat the following until currLesson's readDurationAndTopic ( ) method returns false: Assign currLesson with a new Lesson object. Use currLesson's readDurationAndTopic ( ) method to
Repeat the following until currLesson's readDurationAndTopic method returns false:
Assign currLesson with a new Lesson object.
Use currLesson's readDurationAndTopic method to read each pair of inputs, integer duration and string topic.
If currLesson's readDurationAndTopic method returns true, append currLesson to ArrayList lessonList.
Ex: If the input is Hobbies Trade Finance Fashion then the output is:
Lesson duration: Topic: Hobbies Lesson duration: Topic: Trade Lesson duration: Topic: Finance Lesson duration: Topic: Fashion
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
