159.326-Software-Architecture/AppLogic/CompetitorStoreFront.cs

49 lines
1.3 KiB
C#
Raw Permalink Normal View History

2021-09-14 12:31:36 +12:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AppLogic
{
public class CompetitorStoreFront : IStoreFront
{
string _storefrontName;
string _storefrontAddress;
string _storefrontPhoneNumber;
string[] _storefrontOpenDays;
TimeSpan[] _storefrontTimeOpen;
List<IProduct> _storeProducts;
public string GetName => _storefrontName;
public string GetAddress => _storefrontAddress;
public string[] GetOpenDays => _storefrontOpenDays;
public TimeSpan[] GetOpenTime => _storefrontTimeOpen;
public string GetPhoneNumber => _storefrontPhoneNumber;
public List<IProduct> GetProducts => _storeProducts;
public CompetitorStoreFront(string name, string location, string phone, string[] workingDays, TimeSpan[] dayLengths)
{
_storefrontName = name;
_storefrontAddress = location;
_storefrontPhoneNumber = phone;
_storefrontOpenDays = workingDays;
_storefrontTimeOpen = dayLengths;
_storeProducts = new List<IProduct>();
}
public override string ToString()
{
return _storefrontName;
}
}
}