Program.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomerOrders
{
class Program
{
static void Main(string[] args)
{
var sa = new StorageArea(1111, "Ujjwals Storage");
var item = sa.FindItem(1111);
Console.WriteLine("Returning item : \'{0}\' from warehouse \'{1}\' whose item id is: {2} ", item.itemname, sa.storageShelfName, item.itemid);
Console.ReadKey();
}
}
}StorageArea.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomerOrders
{
class StorageArea
{
public int storageShelfId { get; set; } // defining properties of storage area class
public string storageShelfName { get; set; } // defining properties of storage area class
public StorageArea(int sid,string sname) // defining constructor
{
storageShelfId=sid;
storageShelfName=sname;
}
public Items FindItem(int id) //method for Items Class
{
Items it=new Items(){ itemid=id,itemname="IPhone 5"};
return it;
}
}
}Items.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomerOrders
{
class Items
{
public int itemid { get; set; }
public string itemname { get; set; }
}
}