๐ WAYPOINT LESSON
Checkpoint โ OOP
โญ beginnerโณ 20 min read๐ Lesson 41 of 85
A media library: a base `MediaItem`, audio and video specializations, and a contract-level player loop.
Checkpoint: the media library
Task: implement in Solution:
- Abstract class
MediaItemโ protectedTitle, public constructor throwingArgumentExceptionfor null/whitespace title, read-onlyTitle,public abstract int PlaySeconds();. Song(string title, int seconds)โ returnsseconds.Video(string title, int seconds, int speed)โ playback atspeed(1 = normal);PlaySeconds()returns the wall-clock time:seconds / speed(integer division is fine).static int TotalRuntime(List<MediaItem> items)โ sum ofPlaySeconds(); null/empty โ 0.