Exemple #1
0
        public static void Main()
        {
            var grades = new List <double>
            {
                3.50, 5.50, 2.99
            };
            var collegeStudent = new CollegeStudent("Svetlin", 17, "Kyustendil", grades);

            Console.WriteLine(collegeStudent.Age);
        }
        static void Main(string[] args)
        {
            int []        marks         = { 77, 87, 69, 74, 89 };
            SchoolStudent schoolStudent = new SchoolStudent("Babu Lal Swami", 21, "12-F", 27, "25/01/2015", "Chiranjiv Bharati School", "Mr. Ajay Singh", marks);

            schoolStudent.ShowDetails();

            Console.WriteLine("\n");
            double[]       tgpa        = { 7.8, 6.7, 8.3, 7.9, 7.7, 6.9 };
            CollegeStudent collStudent = new CollegeStudent("Babu Lal Swami", 21, "K1101", 51, "12/01/2014", "Lovely Professional University", "Lovely Professional University", "Nikhil Sharma", tgpa);

            collStudent.ShowDetails();

            Console.ReadKey();
        }
Exemple #3
0
        public static void Main()
        {
            CollegeStudent stu = new CollegeStudent();

            Console.WriteLine("Enter details for College Student");
            stu.setCollegeStudentDetail();
            stu.setStudentDetail();
            stu._age = 10;
            Console.WriteLine("");
            stu.getCollegeStudentDetail();
            stu.getStudentDetail();

            SchoolStudent stu2 = new SchoolStudent();

            Console.WriteLine("");
            Console.WriteLine("Enter details for School Student");
            stu2.setSchoolStudentDetail();
            stu2.setStudentDetail();
            Console.WriteLine("");
            stu2.getSchoolStudentDetail();
            stu2.getStudentDetail();
            Console.ReadLine();
        }