diff --git a/Helios/Helios.csproj b/Helios/Helios.csproj index b775b0957d0951b25b352aa9cfe76714d5925370..a0e1a5524555a2d6dfeee20f59b4165e7361b0d4 100644 --- a/Helios/Helios.csproj +++ b/Helios/Helios.csproj @@ -6,4 +6,10 @@ <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> + <ItemGroup> + <None Remove="Source\" /> + </ItemGroup> + <ItemGroup> + <Folder Include="Source\" /> + </ItemGroup> </Project> diff --git a/Helios/Source/SolarPanel.cs b/Helios/Source/SolarPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..ab72a117d1ac4ccc082c946f7f533405402467d5 --- /dev/null +++ b/Helios/Source/SolarPanel.cs @@ -0,0 +1,58 @@ +using System; + +namespace Helios.Source +{ + public class SolarPanel + { + public double Efficiency { get; set; } + public double CostPerMetreSquared { get; set; } + public double InstallationCost { get; set; } + public double PowerOutput { get; set; } + public double CostPerWatt { get; set; } + + + public SolarPanel() { } + + public SolarPanel(double efficiency, double costPerMetreSquared) + { + Efficiency = efficiency; + CostPerMetreSquared = costPerMetreSquared; + } + + + public double GetInstallationCost(double area) + { + double installationCost; + + installationCost = area * CostPerMetreSquared; + + this.InstallationCost = installationCost; + + return installationCost; + } + + public double GetPowerOutput(int roofArea, int roofElevation) + { + double powerOutput; + + powerOutput = Efficiency * 1000 * roofArea * Math.Sin(roofElevation); + + this.PowerOutput = powerOutput; + + return powerOutput; + } + + public double GetCostPerWatt() + { + double costPerWatt; + + costPerWatt = this.InstallationCost * this.PowerOutput; + + this.CostPerWatt = costPerWatt; + + return costPerWatt; + } + + } + +} \ No newline at end of file