static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD dvd = new DVD("DVD example", 4700, 1450, "DVD-R"); CD cd = new CD("CD example", 700, 350, "CD-RW"); // TODO: Call each CD and DVD method to verify that they work as expected. dvd.SpinDisc(); cd.SpinDisc(); Console.WriteLine("\n"); dvd.ReadData(); cd.ReadData(); Console.WriteLine("\n"); Console.WriteLine(dvd.DiskInfo()); Console.WriteLine(cd.DiskInfo()); Console.WriteLine(dvd.WriteData(8000)); Console.WriteLine(cd.WriteData(300)); Console.WriteLine(dvd.DiskInfo()); Console.WriteLine(cd.DiskInfo()); }
static void Main(string[] args) { CD cd = new CD("CD example", 700, "CD-R", 350); DVD dvd = new DVD("DVD example", 4700, "DVD-R", 1450); cd.SpinDisc(); dvd.SpinDisc(); cd.ReadData(); dvd.ReadData(); Console.WriteLine(cd.WriteData(275)); Console.WriteLine(dvd.WriteData(8000)); Console.WriteLine(cd.DiskInfo()); Console.WriteLine(dvd.DiskInfo()); }