using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography.X509Certificates;using System.Text;using System.Threading.Tasks;namespace ObjectAndClasses{ internal class food { //member variables private string _name; private int _heal; //constructor method public food(string name, int heal = 0) { _name = name; _heal = heal; Console.WriteLine("\nA new food called "+ _name + " was created!"); } //member methods public void eat() { Console.WriteLine("\nEating {0}!", _name); Console.WriteLine("\nIt healed {0} healthpoint(s)!", _heal); } public void stop() { Console.WriteLine("\nStopped eating {0}!",_name); } public void info() { Console.WriteLine("\nThe food {0} heals {1} hp.",_name,_heal); } public string getName() { return _name; } } }