Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace lesson7_4potok
- {
- class Program
- {
- static void Main(string[] args)
- {
- Human human = new Human(1, 2, 2, "Семен");
- Console.WriteLine("У вашего человека {0} руки", human.GetHands());
- Console.WriteLine("Молодец {0}!", human.GetName());
- }
- }
- class Human
- {
- private int Head;
- private int Hands;
- private int Legs;
- private string Name;
- public Human(int head, int hands, int legs)
- {
- Head = head;
- Hands = hands;
- Legs = legs;
- }
- public Human(int head, int hands, int legs, string name)
- {
- Head = head;
- Hands = hands;
- Legs = legs;
- Name = name;
- }
- public string GetName()
- {
- return Name;
- }
- public int GetHands()
- {
- return Hands;
- }
- }
- class Player
- {
- private int X = 10;
- private int Y = 10;
- public ConsoleColor PlayerColor = ConsoleColor.DarkRed;
- public char PlayerSymbol = 'x';
- public void SetX(int x)
- {
- X = x;
- }
- public void SetY(int y)
- {
- Y = y;
- }
- public int GetX()
- {
- return X;
- }
- public int GetY()
- {
- return Y;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement