Пример #1
0
        public SchoolInformation()
        {
            Initial.WriteFile(@"D:\project\test.doc", "\n----------------Welcome------------------\n");
Doagan:
            Console.Write("Enter the school name : ");
            school = Console.ReadLine();
            bool resul = school.All(x => char.IsLetter(x) || x == ' ' || x == '.');

            if (resul != true)
            {
                Console.Write("\nYou have entered a Wrong Name !! , Re");
                goto Doagan;
            }
            Console.Write("Enter the school motto : ");
            motto = Console.ReadLine();
            Console.Write("Enter the school Uniforms Colors : ");
            colors = Console.ReadLine();
            Console.Write("Enter the school master name : ");
            master = Console.ReadLine();
            Console.Write("Enter The school first year was established : ");
            year = int.Parse(Console.ReadLine());
            Initial.WriteFile(@"D:\project\test.doc", "\nSchool Name: " + school + "\nSchool Motto: " + motto + "\nUniforms Colors: " + colors + "\nschool master: " + master + "\nThe school first year was established: " + year + "\n");

            SchoolInformation.PrintSchoolInformation();
        }
Пример #2
0
 public SchoolInformation(string school, string motto, string colors, string master, int year)
 {
     SchoolInformation.school = school;
     SchoolInformation.motto  = motto;
     SchoolInformation.colors = colors;
     SchoolInformation.master = master;
     SchoolInformation.year   = year;
     SchoolInformation.PrintSchoolInformation();
 }
Пример #3
0
        static void Main(string[] args)
        {
            SchoolInformation school = new SchoolInformation();
            student           s1     = new student();
            Initial           I1     = new Initial();

            I1.displaymenu();
            Teacher        TE = new Teacher();
            InitialTeacher T  = new InitialTeacher();

            T.displaymenu();
            Console.ReadKey();
        }
Пример #4
0
 public SchoolInformation()
 {
     Console.Write("Enter the school name : ");
     school = Console.ReadLine();
     Console.Write("Enter the school motto : ");
     motto = Console.ReadLine();
     Console.Write("Enter the school Uniforms Colors : ");
     colors = Console.ReadLine();
     Console.Write("Enter the school master name : ");
     master = Console.ReadLine();
     Console.Write("Enter The school first year was established : ");
     year = int.Parse(Console.ReadLine());
     SchoolInformation.PrintSchoolInformation();
 }