static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. List <Data> cdData = new List <Data>(); Data musicData1 = new Data("Tearin' Up My Heart", 100); cdData.Add(musicData1); CD cd1 = new CD("NSYNC", "CD-DA", 700, cdData); List <Data> dvdData = new List <Data>(); Data movieData1 = new Data("Chapter 10: Pirate Ship", 300); dvdData.Add(movieData1); DVD dvd1 = new DVD("The Goonies", "DVD-RAM", 5000, dvdData); // TODO: Call each CD and DVD method to verify that they work as expected. Data musicData2 = new Data("Bye Bye Bye", 100); cd1.SpinDisc(); cd1.StoreData(musicData2); cd1.WriteData(); cd1.ReadData(); cd1.ReportInfo(); Data movieData2 = new Data("Chapter 1: Jail Break", 300); dvd1.SpinDisc(); dvd1.StoreData(movieData2); dvd1.WriteData(); dvd1.ReadData(); dvd1.ReportInfo(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD aCD = new CD("The Beatles"); DVD aDVD = new DVD("Halloween"); // TODO: Call each CD and DVD method to verify that they work as expected. aCD.SpinDisc(); aCD.StoreData(); aCD.ReportDiscInfo(); aDVD.SpinDisc(); aDVD.StoreData(); aDVD.ReportDiscInfo(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD newDVD = new DVD("test"); CD newCD = new CD("test2", 700); // TODO: Call each CD and DVD method to verify that they work as expected. newDVD.SpinDisc(); newDVD.StoreData(); newCD.SpinDisc(); newCD.StoreData(); Console.WriteLine(newCD.Name); Console.WriteLine(newDVD.Name); Console.WriteLine(newCD.MaxStorage); Console.WriteLine(newCD.StorageRemaining(300)); Console.WriteLine(newCD); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. List <string> tracks = new List <string>(); tracks.Add("Track 1"); tracks.Add("Track 2"); tracks.Add("Track 3"); tracks.Add("Track 4"); tracks.Add("Track 5"); CD myCd = new CD(500, "Luke Combs", "country", tracks); myCd.SpinDisc(); myCd.LoadData(); myCd.ReadData(); myCd.StoreData(); myCd.WriteData(); myCd.DisplayMenu(); myCd.DisplayData(tracks); List <string> chapters = new List <string>(); chapters.Add("Chp 1"); chapters.Add("Chp 2"); chapters.Add("Chp 3"); chapters.Add("Chp 4"); DVD myDvd = new DVD(200, "Extraction", "Action", chapters); myDvd.SpinDisc(); myDvd.LoadData(); myDvd.ReadData(); myDvd.StoreData(); myDvd.WriteData(); myDvd.DisplayMenu(); myDvd.DisplayData(chapters); // 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) { // TODO: Declare and initialize a CD and a DVD object. // TODO: Call each CD and DVD method to verify that they work as expected. CD cd = new CD("Johnny Cash", "CD"); cd.SpinDisk(); ((IDisk)cd).ReadableByLaser(); ((IDisk)cd).DiskSize(); cd.DataWrittenByLaser(); ((IDisk)cd).DiskMaterial(); cd.StoreData(); DVD dvd = new DVD("Shrek", "DVD", 8); dvd.SpinDisk(); ((IDisk)dvd).ReadableByLaser(); ((IDisk)dvd).DiskSize(); dvd.DataWrittenByLaser(); ((IDisk)dvd).DiskMaterial(); dvd.StoreData(); }