-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.cs
More file actions
executable file
·72 lines (62 loc) · 1.82 KB
/
Student.cs
File metadata and controls
executable file
·72 lines (62 loc) · 1.82 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Turniket_OOP
{
class Student
{
public Student(string Name, string Surname, string Group, string University)
{
name = Name;
surname = Surname;
group = Group;
university = University;
}
private string name;
private string surname;
private string university;
private string group;
public string Name { get => name; }
public string Surname { get => surname; }
public string University { get => university; }
public string Group { get => group; }
<<<<<<< HEAD
=======
>>>>>>> Work Project
public bool Compare(Student student)
{
if (name.Equals(student.Name) &&
surname.Equals(student.Surname) &&
group.Equals(student.Group) &&
university.Equals(student.University))
{
return true;
}
return false;
}
<<<<<<< HEAD
=======
public override bool Equals(Object o)
{
if (o == null || !(o is Student))
{
return false;
}
Student student = (Student)o;
return this.name.Equals(student.Name) && this.surname.Equals(student.Surname);
}
public override int GetHashCode()
{
int hashcode = name == null ? name.GetHashCode() : 0;
hashcode += surname == null ? surname.GetHashCode() : 0;
return 31 * hashcode;
}
public override string ToString()
{
return surname + " " + name;
}
>>>>>>> Work Project
}
}