Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Carbon footprints from human activities are increasingly causing concern due to the carbon dioxide released into the atmosphere. Scientists believe that these greenhouse gases
Carbon footprints from human activities are increasingly causing concern due to the carbon dioxide released into the atmosphere. Scientists believe that these greenhouse gases are responsible for the phenomenon of global warming. You will create a simple Carbon Foot Print application using classes and interfaces. . Create three small classes unrelated by inheritance-classes Building, Car and Bicycle. (10 points) Write an interface ICarbonFootprint with a GetCarbon Footprint Method (10 points) Create a simple UML diagram representing the classes/interface you have created in visual studio as part of your project (5 points) Implement this interface in each of the classes you have created so that a GetCarbon Footprint method in each class calculates an appropriate carbon footprint for that class. You can make an assumption that we are calculating the carbon footprint for usage of car, building, and bicycle and not the construction of such objects (check out a few websites that explain how to calculate carbon footprints-please remember to cite the website in your comments - the calculations may not be very accurate but that is fine-for example, the EPA has an excel sheet with formulas for calculating carbon on vehicles-It estimates about 19.2 lbs of carbon per gallon of gas used. So, your Car class could calculate the carbon foot print by multiplying this value by the average number of gallons used per time period. It is more challenging to calculate the footprint of a building. You can use a simple formula provided here: https://www.buildings.com/smarter- buildings/article/10189039/how-to-calculate-your-carbon-footprint No matter the formula you use, as long as you cite the source, I will accept it. ) (20 points) Write an application that creates objects of each of the three classes, places references to those objects in List , then iterates through the List, polymorphically invoking each object's Get Carbon Footprint method (20 points) Comment appropriately in each of the .cs files you create with regards to name, date, program description etc. and submit one zip file of the entire solution. (5 points)
Step by Step Solution
★★★★★
3.39 Rating (146 Votes )
There are 3 Steps involved in it
Step: 1
using System using SystemCollectionsGeneric Interface for Carbon Footprint public interface ICarbonF...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started