Question: Write the inputLessons ( ) method in the Inventory class. Within inputLessons ( ) , use scnr to read each line number until - 9

Write the inputLessons() method in the Inventory class. Within inputLessons(), use scnr to read each line number until -999 is read from input. If the line number is not equal to -999:
Create a new Lesson object.
Use the Lesson object's readDetails() method to read the lesson's duration and topic from input.
Append the Lesson object to ArrayList lessonList.
Ex: If the input is:
1125 Finance 215 Agriculture 340 Environment -999
then the output is:
Lesson duration: 125, Topic: Finance Lesson duration: 15, Topic: Agriculture Lesson duration: 40, Topic: Environment
}
}
```

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!