static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD cD = new CD("blue"); DVD dVD = new DVD("red"); Console.WriteLine(cD.Memory); Console.WriteLine(cD.WriteDisc(30)); cD.SpinDisc(); cD.ReadDisc(); Console.WriteLine("********************************"); Console.WriteLine(dVD.Memory); Console.WriteLine(dVD.WriteDisc(30)); dVD.SpinDisc(); dVD.ReadDisc(); // TODO: Call each CD and DVD method to verify that they work as expected. }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD backInBlack = new CD("Back in Black", 2, "ACDC albumn", "Rock"); DVD lOTR = new DVD("Lord of the Rings", 12, "Director's cut", "Fantasy"); // TODO: Call each CD and DVD method to verify that they work as expected. backInBlack.ReadDisc(); backInBlack.ReportInfo(); backInBlack.SpinDisc(); backInBlack.StoreData(); backInBlack.WriteDisc(); lOTR.ReadDisc(); lOTR.ReportInfo(); lOTR.SpinDisc(); lOTR.StoreData(); lOTR.WriteDisc(); }
static void Main(string[] args) { CD cd = new CD("Test CD", 100, false); DVD dvd = new DVD("Test DVD", 4000, true); cd.SpinDisc(); dvd.SpinDisc(); cd.ReadDisc(); dvd.ReadDisc(); List <byte> testBytes = new List <byte>(); testBytes.Add(0); testBytes.Add(1); testBytes.Add(2); testBytes.Add(3); Console.WriteLine(cd.WriteData(testBytes, 4)); Console.WriteLine(dvd.WriteData(testBytes, 4)); Console.WriteLine(dvd.WriteData(testBytes, 8000)); }