using System.Collections.Generic;
public static void Main(string[] args)
List<Student> studentlist = new List<Student>();
Strength strength = new Strength();
Student[] stud = new Student[13];
stud[0] = new Student("Ashwin","CSE",20, DateTime.Parse("10/12/2019"));
stud[1] = new Student("Hemant","EC",22, DateTime.Parse("10/12/2018"));
stud[2] = new Student("Shashank","ME",23, DateTime.Parse("12/8/2019"));
stud[3] = new Student("Tarun","EEE",21, DateTime.Parse("10/12/2019"));
stud[4] = new Student("Nikhil","EE",20, DateTime.Parse("08/12/2010"));
stud[5] = new Student("Deep","CE",21, DateTime.Parse("10/12/2019"));
stud[6] = new Student("Ankit","CSE",25, DateTime.Parse("12/05/2010"));
stud[7] = new Student("bride","EC",20, DateTime.Parse("10/02/2020"));
stud[8] = new Student("Ashwin","CSE",20, DateTime.Parse("10/12/2019"));
stud[9] = new Student("Ashwin","EC",20, DateTime.Parse("10/12/2019"));
stud[10] = new Student("Ashwin","CSE",20, DateTime.Parse("10/12/2019"));
stud[11] = new Student("Ashwin","CSE",20, DateTime.Parse("10/12/2019"));
stud[12] = new Student("Ashwin","EEE",20, DateTime.Parse("10/12/2019"));
studentlist.Add(stud[i]);
if(stud[i].Department.ToLower().Equals("cse"))
else if(stud[i].Department.ToLower().Equals("me"))
else if(stud[i].Department.ToLower().Equals("ce"))
else if(stud[i].Department.ToLower().Equals("ee"))
else if(stud[i].Department.ToLower().Equals("eee"))
else if(stud[i].Department.ToLower().Equals("ec"))
int choice = Convert.ToInt32(Console.ReadLine());
for(int i=0;i<studentlist.Count;i++)
Console.WriteLine(stud[i].Name+" "+stud[i].Age+" "+stud[i].Department+" joined on "+stud[i].doj.ToString("d"));
string n=Console.ReadLine();
string d=Console.ReadLine();
int a=Convert.ToInt32(Console.ReadLine());
DateTime doj=Convert.ToDateTime(Console.ReadLine());
Student s=new Student(n,d,a,doj);
if(d.Equals("cse") && strength.CSEcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
else if(d.Equals("ce") && strength.CEcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
else if(d.Equals("me") && strength.MEcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
else if(d.Equals("ee") && strength.EEcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
else if(d.Equals("ec") && strength.ECcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
else if(d.Equals("eee") && strength.EEEcount!=0)
Console.WriteLine("Student "+n+" was added successfully");
Console.WriteLine("Department is full");
Console.WriteLine("Student is too young or too old");
public string Name{get;set;}
public DateTime doj{get;set;}
public string Department{get;set;}
public Student(string n,string dept,int a,DateTime d)
public int CSEcount{get;set;}
public int MEcount{get;set;}
public int EEEcount{get;set;}
public int CEcount{get;set;}
public int ECcount{get;set;}
public int EEcount{get;set;}