파일 목록
-
📁 10
-
📁 3
-
📁 4
-
📁 4-minicalc
-
📁 7
-
📁 parking manager
- 2.cs
- desktop.ini
- Title.png
- 객체지향 3대 특징(+1).txt
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
///Base 클래스(기반 클래스) -> 부모 대신 베이스라는 말을 씀
/// C++은 다중 상속이 되고, C#,JAVA는 단일상속이라 부모,베이스 라고 함
namespace week10
{
internal abstract class Animal
{
private String Name;
public string name
{
get { return this.Name; }
set { this.Name = value; }
}
private int Age;
public int age
{
get { return this.Age; }
set { this.Age = value; }
}
public Animal(string name, int age) {
Name = name;
Age = age;
}
public void AddAge()
{
this.Age++;
}
public abstract void sleep();
}
}