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.
            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();
        }
Exemple #3
0
        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)
        {
            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.
            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.

            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.
        }
Exemple #7
0
        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.
        }
Exemple #8
0
        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.
            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)
        {
            // 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)
        {
            // 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();
        }
Exemple #12
0
        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);
            }
        }