Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace App3b
- {
- class Human
- {
- private string name;
- private int age;
- private double temp;
- public static int counter;
- public static string nationality = "Bulgarian";
- public const double PI = 3.14;
- public readonly double onlyRead = 4.5;
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
- public int Age
- {
- get { return age; }
- set { age = value; }
- }
- public double Balance
- {
- get { return 2 * 2; }
- }
- public Human()
- : this("Deafult", 0)
- {}
- public Human(string name, int age)
- {
- this.name = name;
- this.age = age;
- counter++;
- onlyRead = 2.71;
- }
- public Human(int age, string name)
- : this(name, age)
- {
- }
- public void IntroduceYourSelf()
- {
- Console.WriteLine("My name is {0}. My age is {1}. My balance is {2}. I am {3}", name, age, Balance, nationality);
- }
- public void IntroduceYourSelf(string verbous)
- {
- this.IntroduceYourSelf();
- Console.WriteLine("I am verbous");
- }
- public void Speak()
- {
- //...
- }
- public void Render()
- {
- // ...
- }
- /*
- public string GetName()
- {
- return name;
- }
- public void SetName(string name)
- {
- this.name = name;
- }
- public int GetAge()
- {
- return age;
- }
- public void SetAge(int age)
- {
- this.age = age;
- }
- */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement