From c05d768a4570af5ee7f2533d5a0577b914946a58 Mon Sep 17 00:00:00 2001 From: jiyeong1004 Date: Mon, 29 Mar 2021 15:55:29 +0900 Subject: [PATCH] =?UTF-8?q?3108Kim=20=ED=95=99=EC=83=9D=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HelloStudents/HelloStudents.csproj | 1 + HelloStudents/Program.cs | 12 +++++++++++- HelloStudents/Student3108Kim.cs | 17 +++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 HelloStudents/Student3108Kim.cs diff --git a/HelloStudents/HelloStudents.csproj b/HelloStudents/HelloStudents.csproj index 401c607..92d4f0b 100644 --- a/HelloStudents/HelloStudents.csproj +++ b/HelloStudents/HelloStudents.csproj @@ -46,6 +46,7 @@ + diff --git a/HelloStudents/Program.cs b/HelloStudents/Program.cs index 0d6d98c..88fbe4b 100644 --- a/HelloStudents/Program.cs +++ b/HelloStudents/Program.cs @@ -1,9 +1,11 @@ -using System; +// using은 java의 import 같은 역할 +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +// namespace는 java의 패키지 같은 역할 namespace HelloStudents { class Program @@ -32,6 +34,14 @@ static void Main(string[] args) // 3106 // 3107 // 3108 + students.Add( + new Student3108Kim() + { + FirstName = "지영", + LastName = "김", + StudentNumber = 3108, + BaseYear = 2021 + }); // 3109 // 3110 // 3111 diff --git a/HelloStudents/Student3108Kim.cs b/HelloStudents/Student3108Kim.cs new file mode 100644 index 0000000..63c0686 --- /dev/null +++ b/HelloStudents/Student3108Kim.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HelloStudents +{ + class Student3108Kim : StudentBase + { + public override string Hello() + { + return "안녕? 나는 " + this + "이야!"; + // return "안녕? 나는 " + this.ToString() + "이야!"; + } + } +}