Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions HelloStudents/HelloStudents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Student3099Ham.cs" />
<Compile Include="Student3115Lee.cs" />
<Compile Include="Student3108Kim.cs" />
<Compile Include="Student3103Kim.cs" />
<Compile Include="Student3116JO.cs" />
Expand Down
12 changes: 10 additions & 2 deletions HelloStudents/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading.Tasks; //import

// namespace는 java의 패키지 같은 역할
namespace HelloStudents
Expand Down Expand Up @@ -46,7 +46,7 @@ static void Main(string[] args)
BaseYear = 2020
});
// 3104
// 3105
// 3105
// 3106
// 3107
// 3108
Expand All @@ -65,6 +65,14 @@ static void Main(string[] args)
// 3113
// 3114
// 3115
students.Add(
new Student3115Lee()
{
FirstName = "지민",
LastName = "이",
StudentNumber = 3115,
BaseYear = 2021
});
// 3116
students.Add(
new Student3116JO()
Expand Down
16 changes: 16 additions & 0 deletions HelloStudents/Student3115Lee.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HelloStudents
{
class Student3115Lee : StudentBase
{
public override string Hello()
{
return "안녕? 나는 " + this + "이야~~~~~~~~~~~~~~!"; //this는 this.ToString()과 같다.
}
}
}
2 changes: 1 addition & 1 deletion HelloStudents/StudentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace HelloStudents
abstract class StudentBase : IEquatable<StudentBase>, IComparable<StudentBase>
{
// 속성들 (멤버변수와 다름!)
public string LastName { get; set; }
public string LastName { get; set; } //getter, setter 메서드 생성
public string FirstName { get; set; }
public int StudentNumber { get; set; }

Expand Down