static void Main(string[] args) { if (args.Count() > 0) { Console.WriteLine(args); } CD cd = new CD("Lamb of God", 500, 300); DVD dvd = new DVD("Cloverfield", 1500, 1400); cd.SpinDisc(); dvd.SpinDisc(); cd.ReadData(); dvd.ReadData(); Console.WriteLine(cd.WriteData(200)); Console.WriteLine(dvd.WriteData(100)); Console.WriteLine(cd.Info()); Console.WriteLine(dvd.Info()); //should throw because the disc is full //Console.WriteLine(cd.WriteData(1)); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. List <string> newCDList = new List <string>(); newCDList.Add("Soon You'll Get Better"); newCDList.Add("Cornelia Street"); newCDList.Add("Lover"); newCDList.Add("Paper Rings"); CD myCd = new CD("Lover", "CD", 700, newCDList); DVD myDvd = new DVD("Frozen", "DVD", 8500, 720); // TODO: Call each CD and DVD method to verify that they work as expected. myCd.SpinDisc(); myCd.CheckCapacity(500); Console.WriteLine(myCd.PrintInfo()); myCd.ShowContent(); myDvd.SpinDisc(); myDvd.CheckCapacity(500); Console.WriteLine(myDvd.PrintInfo()); myDvd.GetQuality(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD dvd = new DVD("FIght Club", "DVD", 1000); CD cd = new CD("The Wall", "Music", 500); // TODO: Call each CD and DVD method to verify that they work as expected. dvd.SpinDisc(); cd.SpinDisc(); Console.WriteLine(); dvd.GetRead(); cd.GetRead(); Console.WriteLine(); dvd.PlayDisc(); Console.WriteLine(); cd.PlayDisc(); Console.WriteLine(); cd.Unreadable(); dvd.Unreadable(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD cd = new CD("Jingle Bells", 700, "Audio", "CD"); Dictionary <String, string> dictionary1 = new Dictionary <string, string>(); dictionary1.Add("Track 1", "Believer"); dictionary1.Add("Track 2", "Thunder"); dictionary1.Add("Track 3", "Sugar"); cd.Contents = dictionary1; DVD dvd = new DVD("The Lion King [DVD]", 4700, "Audio/Video", "DVD"); Dictionary <String, string> dictionary2 = new Dictionary <string, string>(); dictionary2.Add("Song1", "4.53"); dictionary2.Add("Song2", "5.55"); dictionary2.Add("Song3", "3.30"); dvd.Contents = dictionary2; //Load Disc Info cd.DiscInfo(); dvd.DiscInfo(); cd.SpinDisc(); dvd.SpinDisc(); //Test for writeData method cd.WriteData(200); cd.WriteData(800); //readData cd.ReadData(); dvd.ReadData(); }
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. var masterOfPuppets = new CD(); var titanic = new DVD(); // TODO: Call each CD and DVD method to verify that they work as expected. masterOfPuppets.PlayMedia(); titanic.PlayMedia(); masterOfPuppets.SpinDisc(); titanic.SpinDisc(); titanic.WriteData("dummydata1"); Console.WriteLine(titanic.FreeSpace); titanic.WriteData("dummydata2"); Console.WriteLine(titanic.FreeSpace); titanic.WriteData("dummydata3"); Console.WriteLine(titanic.FreeSpace); Console.WriteLine(); titanic.ReadData(); Console.WriteLine(titanic.FreeSpace); }
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.DiscInfo()); Console.WriteLine(cd.DiscInfo()); Console.WriteLine(dvd.WriteData(8000)); Console.WriteLine(cd.WriteData(300)); Console.WriteLine(dvd.DiscInfo()); Console.WriteLine(cd.DiscInfo()); dvd.AddFile("Funonabun", 20.00, ".jpg"); cd.AddFile("Wannabe", 400.34, ".mp3"); dvd.DiskContents(); cd.DiskContents(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD myCD = new CD("Cool CD"); DVD myDVD = new DVD("Cool DVD"); // TODO: Call each CD and DVD method to verify that they work as expected. myCD.SpinDisc(); Console.WriteLine(myCD.ToString()); myCD.WriteData("What"); myCD.WriteData("is"); myCD.WriteData("this"); myCD.WriteData("doing?"); Console.WriteLine(myCD.ToString()); myCD.ReadData(); myDVD.SpinDisc(); Console.WriteLine(myDVD.ToString()); myDVD.WriteData("All"); myDVD.WriteData("the"); myDVD.WriteData("pretty"); myDVD.WriteData("horses"); Console.WriteLine(myDVD.ToString()); myDVD.ReadData(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD myDVD = new DVD(); CD myCD = new CD(); // TODO: Call each CD and DVD method to verify that they work as expected. myDVD.SpinDisc(); myCD.SpinDisc(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. CD myCd = new CD("Rockin' Oldies USA"); DVD myDvd = new DVD("Rockin Oldie Movies about the USA"); myCd.SpinDisc(); myDvd.SpinDisc(); // 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 Cd1 = new CD("First CD"); DVD Dvd1 = new DVD("First DVD"); // TODO: Call each CD and DVD method to verify that they work as expected. Cd1.SpinDisc(); Dvd1.SpinDisc(); Console.WriteLine("\n" + Cd1.ToString()); Console.WriteLine(Dvd1.ToString()); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. List <string> playList = new List <string>(); playList.Add("Curtains Up(skit)"); playList.Add("White America"); playList.Add("Business"); playList.Add("Cleanin' Out My Closet"); playList.Add("Square Dance"); playList.Add("The Kiss (skit)"); playList.Add("Soldier"); playList.Add("Say Goodbye Hollywood"); playList.Add("Drips (featuring Obie Trice)"); playList.Add("Without Me"); playList.Add("Paul Rosenberg (skit)"); playList.Add("Sing for the Moment"); playList.Add("Superman (featuring Dina Rae)"); playList.Add("Hailie's Song"); playList.Add("Steve Berman(skit)"); playList.Add("When the Music Stops(featuring D12)"); playList.Add("Say What You Say(featuring Dr.Dre)"); playList.Add("'Till I Collapse (featuring Nate Dogg)"); playList.Add("My Dad's Gone Crazy (featuring Hailie Jade)"); playList.Add("Curtains Close (skit)"); CD cd1 = new CD("Compact Disc", "The Eminem Show", playList.Count, 300, playList); List <string> chapterList = new List <string>(); chapterList.Add("Ch1"); chapterList.Add("Ch2"); chapterList.Add("Ch3"); chapterList.Add("Ch4"); chapterList.Add("Ch5"); chapterList.Add("Ch6"); DVD dvd1 = new DVD("Digital Video Disc", "300", chapterList.Count, 500, chapterList); cd1.DisplayMenu(); cd1.DisplayContents(playList); cd1.LoadData(); cd1.ReadData(); cd1.SpinDisc(cd1); dvd1.DisplayMenu(); dvd1.DisplayContents(chapterList); // 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 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("570 - 1600 rpm", "50GB", "12cm", "Lord of the Rings"); CD newCD = new CD("200 - 500 rpm", "900mb", "8cm", "Fleet Foxes"); // TODO: Call each CD and DVD method to verify that they work as expected. newDVD.SpinDisc(); newDVD.PlayMedia(); newDVD.ReadDiscFacts(); newCD.SpinDisc(); newCD.PlayMedia(); newCD.ReadDiscFacts(); }
public static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD test_dvd = new DVD("Super Fast", 65, "Mary Poppins"); CD test_cd = new CD("Kind of Fast", 36, "Lil wayne"); // TODO: Call each CD and DVD method to verify that they work as expected. test_dvd.PlayMovie(); test_dvd.SpinDisc(); test_dvd.Read(); test_cd.PlaySong(); test_cd.SpinDisc(); test_cd.Read(); }
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()); }
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. 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 cd = new CD("CD example", 700, "CD-R", 350); DVD dvd = new DVD("DVD example", 4700, "DVD-R", 1450); // TODO: Call each CD and DVD method to verify that they work as expected. 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()); }
static void Main(string[] args) { List <string> cdList = new List <string> { "Scenes", "Bloopers", "Trailers for movies you'll never watch" }; CD AllanisMorisette = new CD("Bitter Pill", cdList, "CD-RW"); //LOTR.PlayMovie(); AllanisMorisette.SpinDisc(); // 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. 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. IOpticalDisc myCD = new CD(256, 25, true); myCD.SpinDisc(); myCD.ReadData(); myCD.WriteData(25); myCD.ReadData(); IOpticalDisc myDVD = new DVD(256, 256, false); myDVD.SpinDisc(); myDVD.ReadData(); // TODO: Call each CD and DVD method to verify that they work as expected. }
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)); }
static void Main(string[] args) { // DECLARING AND INITIALIZING OBJECTS TO WORK WITH CD testCD = new CD("Foo Fighters", "The Colour and the Shape", 700, new List <string> { "Monkey Wrench", "Everlong", "My Hero" }, "CD"); DVD testDVD = new DVD("Austin Powers: Goldmember", 4700, new List <string> { "Movie", "Unrated Version", "Special Features" }, "DVD"); CD blankCD = new CD(700); //SPINDISC METHOD SIMPLY TELLS YOU HOW FAST EACH TYPE OF DISC SPINS testCD.SpinDisc(); testDVD.SpinDisc(); Console.WriteLine("\n*****\n"); //REPORTDATA METHOD CAN BE CALLED DIRECTLY, BUT IT'S ALSO CALLED BY THE READDATA METHOD BELOW BECAUSE THAT MAKES MORE SENSE testCD.ReportData(); testDVD.ReportData(); blankCD.ReportData(); Console.WriteLine("*****\n"); //WRITEDATA METHOD REQUIRES USER INPUT testCD.WriteData(); testDVD.WriteData(); blankCD.WriteData(); blankCD.ReportData(); Console.WriteLine("\n*****"); //THE LASER READS THE DATA ON THE DISC AND REPORTS WHAT IT FINDS testCD.ReadData(); testDVD.ReadData(); }
static void Main(string[] args) { // TODO: Declare and initialize a CD and a DVD object. DVD d = new DVD(new Dictionary <string, int>()); d.Contant.Add("music1", 100); d.Contant.Add("music2", 100); d.Contant.Add("music3", 200); DVD d1 = new DVD("My Movie Collections-", 1700, new Dictionary <string, int>(), "Read/Write"); // dvd instance create d1.Contant.Add("I Still know what you did Last Summer", 100); d1.Contant.Add("Paranormal", 100); d1.Contant.Add("Dance With Me", 100); CD c = new CD("Music Audio-Bethoven", 520, new Dictionary <string, int>(), "ReadOnly"); // cd instance create c.Contant.Add("music1", 100); c.Contant.Add("music2", 100); c.Contant.Add("music3", 200); // TODO: Call each CD and DVD method to verify that they work as expected. while (true) { Console.WriteLine("\nSelect choice Number: \n"); int displaySelectedChoice = displayChoice(); if (displaySelectedChoice == 1) { // DVD readdata() AND WriteData() interface call d1.ReadData(d1.Contant, d1.DiscType, d1.Name, d1.Capacity); } else if (displaySelectedChoice == 2) { d1.WriteData(d1.Contant, d1.Capacity); Console.WriteLine("Your DVD Burn complete. Press 3 to look into the content."); } // d1.ReadData(d1.Contant, d1.DiscType, d1.Name, d1.Capacity); // CD Readdata() AND WriteData() interface call else if (displaySelectedChoice == 3) { c.ReadData(c.Contant, c.DiscType, c.Name, c.Capacity); } else if (displaySelectedChoice == 4) { d1.SpinDisc(d1.Name); } else if (displaySelectedChoice == 5) { c.SpinDisc(c.Name); } else if (displaySelectedChoice == 6) { Console.Write("Do you want to EXIT from quiz? (Yes/No): "); string yesOrNO = Console.ReadLine(); if (yesOrNO.ToLower() == "yes") { Console.WriteLine("--------------------GOODBYE----------------------------------"); break; } } //c.ReadData(c.Contant, c.DiscType, c.Name, c.Capacity); } }