Exemplo n.º 1
0
        /// <summary>
        /// Code which can be used to generate data for Military Recruitment if
        /// the data fill becomes lost or corrupted
        /// </summary>
        public void GenerateTestData()
        {
            // Instantiate Applicant object
            Applicant a1 = new Applicant("100", "Mamsol Riches", "AirForce Officer", "15 Riverside avenue dh4 5lm", " [email protected]");
            Applicant a2 = new Applicant("300", "David Cameroon", "Army Cadet Officer", "27 Adelaide Avenu, Newcastle ne1 5tr", " [email protected]");
            Applicant a3 = new Applicant("500", "Goodluck Jonathan", "AirForce Officer", "104 Port arthur road, Nothingham ng2 4lt", " [email protected]");
            Applicant a4 = new Applicant("700", "Richard Mark", "Naval Force Officer", "11 Macdonals street, Hartlepool ts26 5rm ", " [email protected]");
            Applicant a5 = new Applicant("900", "Solomon Olutunde", "AirForce supretendent Officer", "301 ramson Noal Road, Surerest Sunderland sr2 6de", " [email protected]");
            Applicant a6 = new Applicant("1900", "Okonko Malik", "Army Officer", "101 Julios Mountain Avenue, London se18 6dy", " [email protected]");
            Applicant a7 = new Applicant("3200", "Janet Laurell", "Naval Force supretendent Officer", "301 ramson Noal Road, Surerest Sunderland sr2 6de", " [email protected]");
            Applicant a8 = new Applicant("1100", "Write Harmmer", "AirForce supretendent Officer", "3003 ramson Lord Road, Surerest Sunderland sr17 9de", " [email protected]");
            Applicant a9 = new Applicant("2300", "John Kerry", "Army Officer  Officer", "277 Malifax Addex Road, Surerest Sunderland sr22 8ae", " [email protected]");

            applicantList.AddApplicant(a1);
            applicantList.AddApplicant(a2);
            applicantList.AddApplicant(a3);
            applicantList.AddApplicant(a4);
            applicantList.AddApplicant(a5);
            applicantList.AddApplicant(a6);
            applicantList.AddApplicant(a7);
            applicantList.AddApplicant(a8);
            applicantList.AddApplicant(a9);

            // Instantiate ForceService object

            ForceService s1 = new ForceService("MR1001", "Logical Reasoning", " 30 ", "Right Philip", " [email protected]");
            ForceService s2 = new ForceService("MR1002", "Abstract Reasoning", "60", "James Cook", " [email protected]");
            ForceService s3 = new ForceService("MR1004", "Running Exercise", "40", "Tommy Jerry", "*****@*****.**");
            ForceService s4 = new ForceService("MR1006", "Communication Test", "60", "Lord Luggard", "*****@*****.**");
            ForceService s5 = new ForceService("MR1008", "Swimming Skill Test", "40", "Deep.Seewood", "*****@*****.**");
            ForceService s6 = new ForceService("MR2009", "Long Walk Test", "20", "Maggic Johnson", "*****@*****.**");
            ForceService s7 = new ForceService("MR2005", "Road Mapping Test", "40", "Marggor Lyrics", "*****@*****.**");
            ForceService s8 = new ForceService("MR2007", "GIS Management", "20", "Manny Lorrell", "*****@*****.**");
            ForceService s9 = new ForceService("MR2008", "GIS Management", "20", "Danny Maxorrell", "*****@*****.**");

            forceServiceList.AddForceService(s1);
            forceServiceList.AddForceService(s2);
            forceServiceList.AddForceService(s3);
            forceServiceList.AddForceService(s4);
            forceServiceList.AddForceService(s5);
            forceServiceList.AddForceService(s6);
            forceServiceList.AddForceService(s7);
            forceServiceList.AddForceService(s8);
            forceServiceList.AddForceService(s9);


            // Enrol some Applicant into the Military Recruitment Force Services
            s1.Enrol(a1);
            s2.Enrol(a1);
            s3.Enrol(a1);

            s2.Enrol(a2);
            s3.Enrol(a2);
            s4.Enrol(a2);

            s5.Enrol(a3);
            s6.Enrol(a3);

            s5.Enrol(a4);
            s8.Enrol(a5);
            s2.Enrol(a7);

            s9.Enrol(a1);
            s1.Enrol(a9);
            s2.Enrol(a8);

            // Enter some Grade for Applicants on ForceService Examination
            s1.EnterMark(a1, 40);
            s2.EnterMark(a2, 30);
            s3.EnterMark(a3, 40);
        }