Question: Write the inputRecordings ( ) method in the Collection class. Within inputRecordings ( ) , use scnr to read pairs of inputs, integer currDuration and

Write the inputRecordings() method in the Collection class. Within inputRecordings(), use scnr to read pairs of inputs, integer currDuration and string currTopic, until -99 is read from input. Create each Recording object with currDuration and currTopic as arguments and append each object to ArrayList recordingList.
Ex: If the input is 45 Medicine 130 Fashion 30 Agriculture 115 Travel -99, then the output is:
Recording duration: 45, Topic: Medicine
Recording duration: 130, Topic: Fashion
Recording duration: 30, Topic: Agriculture
Recording duration: 115, Topic: Travel

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!