-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDepartment.cs
48 lines (43 loc) · 1.33 KB
/
Department.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SkillMineProject7.ObjectAndClasses
{
class Department
{
int id;
String name;
public int Id { get => id; set => this.id = value; }
public string Name { get => name; set => this.name = value; }
Department(int id, String name)
{
this.id = id;
this.name = name;
}
public void showDepartmentDetails()
{
Console.WriteLine("Department id: is" + id + "and name of department is" + name);
}
}
/*class Studentt
{
int roll;
String name;
Department d;
public int Roll { get => roll; set => this.roll = value; }
public string Name { get => name; set => this.name = value; }
internal Department D { get => d; set => this.d. =value; }
void displayStudentDetails()
{
d.showDepartmentDetails();
Console.WriteLine("Student roll number is" + roll + "and name of student is" + name);
}
*//*public Studentt(int roll, String name, Department d)
{
this.roll = roll;
this.name = name;
}*//*
} */
}