User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
start [2011/05/10 11:23]
kel
start [2013/04/27 12:35]
taochang
Line 1: Line 1:
-Multiple Choices Algorithm - by Mark Kelly+Every day, many people waste tons of energy, while using many things in their home. Whether it's through simple appliances or water usage, people waste energy at home, rather than using green energy. Here is a bit of advice that will help you make use of green energy in your own home.[[http://​enigmapedia.com/​index.php?​title=Ways_You_Can_Use_Green_Energy_To_Power_Your_Home|Comflor80]]
  
-Another in the Fun with Algorithms series+A very easy and cheap way to save on your high energy bills is to try installing some low flow shower heads and faucets. Switching from the standard, 2.5 gallon/​minute shower heads, to the low flow 1.5 gallon/​minute ones, can help you save a lot with your hot water energy costs.
  
-Stuff Pty Ltd sells stuff. The unit cost of the stuff varies according ​to the quantity orderedCustomers ​can order any number ​of items Stuff Pty Ltd use this scale: +In order to save extra energy around ​the house, be sure to set your electronics to a power-saving mode when not using them. A power-saving mode will reduce ​the amount of energy spent by the deviceThis way, you can save energy and cut down the cost of the electric bill.
-1-9 items = $100 each +
-10-19 items = $97 each +
-20-29 items = $92 each +
-30-39 items = $88 each +
-40-49 items = $85 each +
-50 or more = $82 each+
  
-Taskusing pseudocodecreate an algorithm ​to calculate ​the unit cost of the items at different quantitiesThen calculate a total cost with 10% GST added. ​  +[[http://​saintpaulrfp.com/​story.php?​title=comflor80-in-your-design|comflor 80 corus]] If you are trying to save on your electricity billtry to use your ceiling fan more in the summerA ceiling fan can help to make any room feel about 10 degrees cooler, and it costs much less to run than an air conditioner doesYou will be saving money and also using less electricitymeaning you're doing something great for the environment.
-Convert the pseudocode into code. +
-Create test data to fully test all aspects of the solution’s functionality. +
-Note:  Input data need not be validatedand the interface can be very basic. +
-  +
-Sample VB2010 solution +
-Public Class Form1 +
-    ' Multiple options algorithm +
-    ' by M.Kelly 10 May 2011 +
-    ' Version 1.0 +
-    ' To Do Next: nil+
  
-    Private Sub btnCalc_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles btnCalc.Click +Simply cleaning or changing the filter on your furnace can cut electricity costs significantlyToo much dirt or dust built up in the vents can make more heat necessary to warm the house. It only takes a short amount of time to clean these, and you will notice the change ​in your bills!
-        Dim Qty As Integer = CInt(txtQty.Text) +
-        Dim inctax As Single = 0  '​declare ​and initialise ​in one hit +
-        ' deliberately lacks validation of qty +
-        Select Case Qty +
-            Case 1 To 9 +
-                lblCostper.Text = 100 +
-            Case 10 To 19 +
-                lblCostper.Text = 97 +
-            Case 20 To 29 +
-                lblCostper.Text = 92 +
-            Case 30 To 39 +
-                lblCostper.Text = 88 +
-            Case 40 To 49 +
-                lblCostper.Text = 85 +
-            Case Else +
-                lblCostper.Text = 82 +
-        End Select+
  
-        lblSubtotal.Text = Qty * CInt(lblCostper.Text)  'using labels ​for output+A significant green energy initiative is to is having a professional do a home energy auditThese professionals will assess your home and find areas where you can save money and conserve energySome power companies even offer this service ​for free to help reduce the impact of their customers on their energy supply.
  
-        '​inctax is here as sample use of variables for calculations and  +[[http://​wiki.gdite.mx/​index.php?​title=Green_Energy_Tips_That_Can_Save_You_A_Fortune!|comflor 80]] If you have tank-style water heater that you aren't prepared to replace yet, conserve electricity or natural gas by lowering its thermostatBy changing the thermostat from the factory-set 140 degrees to 120 degrees, the heater requires 6 to 10 percent ​less energy to keep your water hot.
-        ​'using labels just for display purposes. +
-        'Using variables mean less converting back & forth between text and number.+
  
-        inctax = CInt(lblSubtotal.Text) * 1.1           '​add GST   +If you are planning ​to go green in your home, you may want to consider contacting your utility provider to learn about your optionsThey may have some great suggestions for you look intoIf they do not have the options for youthey can direct you to where you can find them.
-        'The final total is nicely formatted currency just to show how it's done. +
-        'Nice formatting is not needed ​in U3O2. +
-        lblIncTax.Text = Format(inctax"​$#,####​.#0") +
-    End Sub+
  
-     +If your exhaust fans are more than five years oldconsider replacing them with newer more efficient models. Each year you should examine each exhaust fan in your home for damage and replace the filterA damaged exhaust fan uses more energy and changing the filter allows the fan to work more efficiently.
-    Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles Button1.Click +
-        End +
-    End Sub+
  
-End Class+[[http://​www.youdoze.com/​story.php?​title=comflor80-for-your-construction|Comflor80]] Cut down on electricity by hanging at least some of your clothes outdoors to dry. The sun and wind can dry them quickly and your clothes will smell fresher when you bring them in. Bedding and towels can make your dryer run a long time and they are easy to hang outdoors.
  
-+Too often, the water heater allows water to reach a scalding temperature when trying to take a shower. Try turning the maximum heat on the water heater down by twenty degrees, and you will see a definite decrease in electricity costs. Tankless water heaters are another green energy option for anyone.
  
-Sample output +As you have read, going greener in the home is not as difficult as some may think and in the long run, produces valuable savings. Considering ​that we have but one environment ​to sustain uswe must see to its protection and preservationHopefully, this article has provided you with enough information and motivation to begin your green endeavors today!
-Perhaps more decorative ​that it needs to be for U3O2but I can’t abide messy interfaces. +
-  +
-<​can'​t insert image!+
- +
- +
- +
----------------------------------------------------------------------------------------------+