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 06:30]
taochang
Line 1: Line 1:
-Multiple Choices Algorithm - by Mark Kelly+Green energy is something everyone wants to use, but there are not many sources available as of yet. There are some ideas in the following article, however, to help you use green energy in your home. Use this information to educate yourself about energy sources and better ways to care for the environment.[[http://​enigmapedia.com/​index.php?​title=What_Is_Green_Energy?​_Learn_About_It_Here!|Steel Floor Decking]]
  
-Another in the Fun with Algorithms series+If at all possible, consider switching your electric or oil heating to gas. This is both better for the environment and your pockets. Just be aware that this is can be a complicated job that should be taken on by a skilled expert, should you decide to make this switch.
  
-Stuff Pty Ltd sells stuffThe unit cost of the stuff varies according ​to the quantity orderedCustomers can order any number of items Stuff Pty Ltd use this scale: +Don't use your dishwasher until you have a full loadMake sure your dishwasher is full before using it, hecause it takes the same amount ​of water and energy to wash a full load as it does half a load. Use the shortest cycle possible, if you can, turn the dishwasher off prior to the drying cycle, opening the doorThis allows the dishes to air dry.
-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+
  
-Task: using pseudocodecreate an algorithm ​to calculate ​the unit cost of the items at different quantities. Then calculate a total cost with 10% GST added. ​  +If you are interested in saving energyutilize the warm summer months ​to help you dry your clothes. Forgo the use of your dryer, and hang your wet items out in the bright sunlightNot only will you save energybut your clothes will smell fresh and feel wonderful.
-Convert ​the pseudocode into code. +
-Create test data to fully test all aspects of the solution’s functionality. +
-Note:  Input data need not be validated, and the interface can be very basic. +
-  +
-Sample VB2010 solution +
-Public Class Form1 +
-    ' Multiple options algorithm +
-    ' by M.Kelly 10 May 2011 +
-    ' Version 1.+
-    ' To Do Next: nil+
  
-    Private Sub btnCalc_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles btnCalc.Click +Do not leave your freezer and refrigerator open for a long period of timeOf course this can spoil your foodbut it can also use large amounts of energyWhen you are cooking but you need food from the refrigerator or freezer, keep it closed after you get something out of it.
-        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+[[http://​sahul111sahul.blogspot.in/​2013/​03/​why-should-i-care-about-steel-floor.html|Steel Floor Decking]] Contact your current energy provider and see if they offer an option ​for you to use renewable-energy sources. Many providers harness renewable energy through solar or wind power and therefore, have this option available for their clients. However, you should keep in mind that this may cost a little bit extra.
  
-        '​inctax ​is here as sample use of variables for calculations and  +Buying a hybrid vehicle ​is a good way to save energy, but that all depends on what type of vehicle you purchaseIt is always a much better choice to purchase a smaller hybrid vehicle than to purchase a large hybrid SUV. The SVUs save so little energy that it is no different than having a compact non-hybrid vehicle.
-        '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   +People looking ​to go green would be wise to use oil lanterns to light up their homesOil lanterns don't use any electricity at alland there are even some lanterns out there that will run on used vegetable oil that you can easily get from restaurants or your own kitchen.
-        '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+
  
-     +Insulate your homeA pre-1950 home that isn't insulated will use approximately 60 percent more energy than a house that was built after 2000Adding sufficient insulation to your attic and basement will greatly improve your home's energy efficiency. As well as keeping you warm in the winter, you will find that the home remains much cooler in the summer months, reducing the need for an air conditioner.
-    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click +
-        End +
-    End Sub+
  
-End Class+Opt for rechargeable over disposable batteries. The debate on using disposable batteries or rechargeable batteries has long been a heavy conversation. Of course, rechargeable batteries are better for the environment,​ and that is a point that cannot be argued against. After many years, studies have shown that rechargeable batteries also concretely save you money on energy costs as well. It looks like there is nothing to argue about now.
  
-+[[http://​www.occupedia.nl/​index.php?​title=Green_Energy_Tips_That_Will_Save_You_Money!|Steel Floor Decking]] As you ready yourself to make the switch to green energy, try getting a step ahead of the game by decreasing your present energy needs. By using less energy, it will be that much easier to switch to alternative sources because you won't be using as much. Good ways to start include using less light in your home, shortening hot showers and using cool instead of hot water for laundry.
  
-Sample output +So as you can see, it really is not that hard to make changes in your life that will help you take advantage of green energy. Sotake that first step and see what even a small change ​can make. In return, you will be sure to make the world a better place for all.
-Perhaps more decorative that it needs to be for U3O2but I can’t abide messy interfaces. +
-  +
-<​can'​t insert image!>​ +
- +
- +
- +
----------------------------------------------------------------------------------------------+