Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Linq;
Using System.Text;
Using System.Windows.Forms;
Namespace WindowsFormsApplication4
{
public partial class Form1:form
{
Public Form1 ()
{
InitializeComponent ();
}
Interface IPlayer
{
String Play ();
String Stop ();
String Pause ();
String Pre ();//The first skeleton?
String Next ();
}
IPlayer IPlayer;
public class Mp3:iplayer
{
public string Play ()
{
Return "Positive y in ú broadcast ¥ put?" MP3 song è qu ú!? ";
}
public string Stop ()
{
Return "Stop 1 broadcast ¥ put?" MP3 song è qu ú!? ";
}
public string Pause ()
{
Return "Temporary y stop sowing ¥ to put?" MP3 song è qu ú!? ";
}
public string Pre ()
{
Return "broadcast ¥ put?" first 罬 P3 song è qu ú!? ";
}
public string Next ()
{
Return "Sow ¥ next?" First 罬 P3 song è qu ú!? ";
}
}
public class Avi:iplayer
{
public string Play ()
{
Return "Positive y in ú broadcast ¥ put?" Avi song è qu ú!? ";
}
public string Stop ()
{
Return "Stop 1 broadcast ¥ put?" Avi song è qu ú!? ";
}
public string Pause ()
{
Return "Temporary y stop sowing ¥ to put?" Avi song è qu ú!? ";
}
public string Pre ()
{
Return "broadcast ¥ put?" first 罙 vi song è qu ú!? ";
}
public string Next ()
{
Return "Sow ¥ next?" First 罙 vi song è qu ú!? ";
}
}
private void Button7_click (object sender, EventArgs e)
{
Avi avi = new avi ();
iplayer = (iplayer) avi;
}
private void Button3_Click (object sender, EventArgs e)
{
Label1. Text + = iplayer. Pause ();
}
private void Button1_Click (object sender, EventArgs e)
{
MP3 mp3 = new MP3 ();
iplayer = (iplayer) mp3;
}
private void Form1_Load (object sender, EventArgs e)
{
}
private void Label1_click (object sender, EventArgs e)
{
}
private void Button2_Click (object sender, EventArgs e)
{
Label1. Text + = iplayer. Pre ();
}
private void Button4_Click (object sender, EventArgs e)
{
Label1. Text + = iplayer. Play ();
}
private void Button5_click (object sender, EventArgs e)
{
Label1. Text + = iplayer. Pause ();
}
private void Button6_click (object sender, EventArgs e)
{
MP3 m = new MP3 ();
Label1. Text + = iplayer. Next ();
}
}
}
Write an abstract class using C #