Question: Build an interface called IPlayable. This is an interface for electronic media. It has: Has a void method Play which accepts no parameters. In implementing
Build an interface called IPlayable. This is an interface for electronic media. It has:
Has a void method Play which accepts no parameters. In implementing classes it will play the media.
Has a void method Pause which accepts no parameters. In implementing classes it sill pause the media.
Has a void method Stop which accepts no parameters. In implementing classes it will stop the media.
Has a void method Seek which accepts position parameter, which is a double. It moves the current playtime to the provided position.
Has a property Title, which is a string. This property can be read by but not set by external classes.
Has a property Duration, which is a double. It returns the total runtime of the media. It can be read by but not set by external classes.
Build a class, AudioPlayable, which implements the IPlayable interface. All void methods should print to console indicating that they have been activated. When Stop is invoked, the current position is set to When Play is invoked it plays from the current position. When Pause is invoked it will pause at the current position. Title and Duration cannot be changed after instantiation.
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
