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 70 Hobbies 75 Trade 135 Finance 65 Fashion -999, then the output is:
Lesson duration: 70, Topic: Hobbies Lesson duration: 75, Topic: Trade Lesson duration: 135, Topic: Finance Lesson duration: 65, Topic: Fashion

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!