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/21 11:31]
taochang
Line 1: Line 1:
-Multiple Choices Algorithm ​by Mark Kelly+Are you tired of closing the drapes because looking at your yard depresses you? While many people give up on their landscaping and just pray it fixes itself, that strategy tends to fail. Instead, pick up your trowel and get ready to renovate your yard with a few simple ideas like those you'll find below.[[http://​raghuram11.postbit.com/​the-most-useful-crops-to-select-for-a-hardy-landscaped-backyard.html|ground reinforcement products]]
  
-Another in the Fun with Algorithms series 
  
-Stuff Pty Ltd sells stuffThe unit cost of the stuff varies according ​to the quantity ordered. Customers can order any number ​of items Stuff Pty Ltd use this scale: +Lose the tape measureUnless you are planting a vegetable garden where you need to have to order, stay away from measured spacing. A row of plants equally spaced in a row looks neat and orderly - and completely unnatural. For a flowing and natural look to your landscape, vary the spacing and types of plants you choose.
-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 pseudocode, create an algorithm to calculate the unit cost of the items at different quantities. Then calculate ​total cost with 10% GST added. ​  +Consider adding ​fireplace ​into your landscaping plansOutdoor fireplaces have become very popular due to local ordinances having laws against fire pits and various other outdoor firesEven in warm climates, it is nice to warm up by a fire in the evening hours, and can be a great focal point during outdoor events.
-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 +Consider hiring a landscaping firm for your landscaping projectUnless you are a complete expert on the matterit is likely in your best interest to have the liability on someone elseTrees, shrubs ​and flowers are all quite expensive, and if ruined due to being planted incorrectly,​ they will have to pay for the error.
-        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+The long term success of your landscaping is dependent upon preparing the soil before you start plantingIf you condition your soil and add mulch, not only will your efforts enhance plant growth, it will also significantly reduce the number of weeds in your landscaping. An additional benefit of preparing the soil is the reduced amount of water which you will need to maintain landscaping that is both beautiful and healthy.
  
-        ​'inctax is here as a sample ​use of variables for calculations ​and  +While growing exotic plants may bring a good look to your garden, don'use them unless you are ready for all of the maintenance, ​and care that is involved in thatPlanting things that are native to the area require a lot less work, and it lowers the chance that plants will perish.
-        '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  ​ +[[http://​wiki.mangotele.com/​index.php?​title=Improve_The_Exterior_Of_Your_Home_With_These_Handy_Landscaping_Tips.|Ground Reinforcement Equipment]] 
-        '​The final total is nicely formatted currency just to show how it's done. +Before beginning any landscaping job or even buying any equipment, it is a good idea to have a thorough plan of what you want to accomplishBe as precise as possible on what features you want to add or removeso that you will know exactly what needs to be bought to complete the taskand how long it will take.
-        'Nice formatting is not needed in U3O2. +
-        lblIncTax.Text = Format(inctax"$#,####.#0") +
-    End Sub+
  
-     +Choose plants to use in your landscape that are native to your area whenever possibleIf you choose plants that grow in your areait'll be easier to maintain them, and you'll be able to get advice from more people if you need help growing themForeign plants may not grow as well in your climate and may be more difficult to get ahold of and maintain.
-    Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles Button1.Click +
-        End +
-    End Sub+
  
-End Class+A carefully chosen landscaping project can be used to showcase features, or distract the eye from certain unsightly structural aspects of a home or business. Highlight an interesting architectural detail with spot lighting, or sheared shrubs. Plant tall grasses to conceal unattractive elements, such as a visible foundation, or air-conditioning unit.
  
-+For any landscaping job, a consultant will be your best friend. It is not necessary to hire a landscaper to do the full job for you, but you will want to hire a consultant that will help you with your plans. The advice of a consultant will keep you from making costly mistakes when you actually start landscaping.
  
-Sample output +If your soil is really rocky, use that to your advantageThey are so many types of plants of drought tolerant you can plant in your yard or even consider creating an entire rock garden. This is a lovely way to landscape your yard without continuously fighting to keep your plants healthy, hydrated and alive.
-Perhaps more decorative ​that it needs to be for U3O2, but I can’t abide messy interfaces. +
-  +
-<can't insert image!>+
  
- +[[http://​www.flipsnack.com/​en/​my-flipping-books/​details/?​flip=fd1m01td|Ground Reinforcement Cosmetics]]Now that you know how others are fixing their yard dilemmas, you'll be ready to tackle your own in no time at all. It just takes a few simple steps to really fix the problems and create new, better-looking elements, so that you can look out the window and smile at every day. Be sure that you make time today so that you can enjoy your yard tomorrow.
- +
----------------------------------------------------------------------------------------------+