using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace study02
{
internal class Goliath
{
public int hp;
public float moveSpeed;
//생성자
public Goliath()
{
}
public void Stop()
{
Console.WriteLine("골리앗이 정지했습니다.");
}
public void Move()
{
Console.WriteLine("골리앗이 이동했습니다.");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace study02
{
internal class App
{
//생성자
public App()
{
Goliath goliath = new Goliath();
goliath.hp = 125;
goliath.moveSpeed = 2.2f;
Console.WriteLine("생명력: {0}", goliath.hp);
Console.WriteLine("이동속도: {0}", goliath.moveSpeed);
goliath.Stop();
goliath.Move();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace study02
{
internal class Program
{
static void Main(string[] args)
{
new App();
}
}
}