From 703022b5117e0ad54ba0da25734d3aff8547f41a Mon Sep 17 00:00:00 2001
From: Dan <daniel2.lorych@live.uwe.ac.uk>
Date: Wed, 27 Apr 2022 18:48:43 +0100
Subject: [PATCH] Add Source folder and SolarPanel class

---
 Helios/Helios.csproj        |  6 ++++
 Helios/Source/SolarPanel.cs | 58 +++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 Helios/Source/SolarPanel.cs

diff --git a/Helios/Helios.csproj b/Helios/Helios.csproj
index b775b09..a0e1a55 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 0000000..ab72a11
--- /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
-- 
GitLab