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/15 12:15]
hantrduarte
Line 1: Line 1:
-Multiple Choices Algorithm - by Mark Kelly +<​p>​These e cigs may have only been around for almost 3 years, but they have in deed made a big impression on the way people smokeThese handy devices are a great substitute for those harmful cigarettes which many people seem to smoke. Many people prefer to have these e cigs in a smaller size rather than the bigger size which was once highly sought afterThere seems to be quite a few people who would prefer one of these e cigarettes rather than the usual health deterring cigarettes
- +</​p><​p><​img src="​http://​www.electroniccigarette.net/​wp-content/​uploads/​2012/​02/​bluflavors.jpg"​ alt="E cigarette reviews"​ /></​p><​p>​ 
-Another ​in the Fun with Algorithms series +The e cigs also have a red light at the end and this lights up when the user inhales, so the e cigs are much like real cigarettes in their own rightThe e cigs really do look like the real thing they are the same shapesize and weight as the real thingThe e cigs will really help make your life and lungs that much greener! 
- +</​p><​p><​img src="​http://​www.blogcdn.com/www.engadget.com/​media/​2011/​07/​7-13-2011e-litesexperience2.jpg" alt="​Consumer reports on electronic cigarette brands"​ /></​p><​p>​ 
-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: +Electric cigarettes use liquid nicotine to function ​and also uses a small battery so when the user inhales the liquid is turned into smoke vapor and this is how to user gets his or her nicotine ​hit, it really is clever stuff. This gives you faster nicotine hits than the usual conventional methods. At the same time that led light at the tip of the electric cigarette will glow orange to make it look a lot more authenticIt will not burn anything either as the tip of the cigarette is fake
-1-9 items $100 each +</​p><​p><​img src="​http://​www.stevevape.com/​wp-content/​uploads/​2012/​03/​Bolt-Review-Title-Image.jpg" alt="​Ecigarette reviews"​ /></​p><​p>​ 
-10-19 items $97 each +As these e cigs are legal and have no tobacco in them, you can actually smoke them in public and take them with you wherever you goThere are in addition ​number ​of flavors ​for you to tryThere are additional flavors such as rum and banana as wellThere are differing strengths of nicotine which you could get hold of this differs from 1mg right up to 10mgIt is additional to have varying strengths as you could begin with the stronger nicotine and then perhaps reduce the amount you are takingYou can easily change the flavors and strengths of this e cig so you won't be stuck with only one particular flavor or strength. If you think those points on [[http://​www.ecigarettereviews.com/​expert-rates-the-top-electronic-cigarette-brands/​|top electronic cigarette reviews]] are something, then there is more to read as you know plus tons elsewhereIf you think this is all there is, then you are in for a real treat when you see what else we have written on the matter
-20-29 items = $92 each +</​p><​p>​ 
-30-39 items = $88 each +We have always found that the more we learn about somethingthere are opportunities that become apparent that we did not know about. That is why it is so imperative that you really dissect what you are reading here; your awareness will be the better for it. Make no mistake about it - you have the power to exert far more control over your life than you realize
-40-49 items = $85 each +</​p><​p>​ 
-50 or more = $82 each +An e cig could be perfect if you would like to ensure you don't ruin your health but additionally enjoy the feeling a cigarette may give youIf an cig seems like something you would be interested in then you should perhaps look into doing some research so you know all the ins and outs of this deviceIf you carry out some extensive research then you may be able to find out all you need to know regarding this electronic cigarette
- +</​p><​p>​ 
-Task: using pseudocode, create an algorithm to calculate ​the unit cost of the items at different quantities. Then calculate a total cost with 10% GST added. ​  +Celebrities have also been seen to use the ecigs, this includes Jimmy White the famous snooker player who has been seen to use his vapor cigarette in contests on a regular basis. An audience ​that attended Alan Tichmarsh'​s 400th anniversary show got one handed ​to them for free and Alan himself smoked one live on air. Paris Hilton also smokes e cigs out on the town and has had pictures taken holding one
-Convert ​the pseudocode into code. +</p><p
-Create test data to fully test all aspects of the solution’s functionality. +It is well known that a huge number of people are affected by [[http://​tobacco.ucsf.edu/​e-cigarettes-release-toxic-chemicals-indoors-should-be-included-clean-indoor-air-laws-and-policies|these kinds of ideas]] and just about everywhere. Indeed, perhaps most people would never think of it or realize what it can do or even when it could make its presence known. 
-Note:  Input data need not be validated, and the interface can be very basic+</​p><​p>​ 
- +The best approach is to try to maintain an awareness as much as you can. We are much more reactive to things because we tend to wait until it is happening, and there is less thought about preventing something. Have you not ever noticed that about people or even your self? It does seem to be very prevalent in our opinion. If you can put things in place that will help you, then that is smart; and we mean becoming more aware about it.</​p>​
-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.Object, ByVal e As System.EventArgs) Handles btnCalc.Click +
-        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 +
- +
-        '​inctax is here as sample use of variables ​for calculations and  +
-        '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   +
-        '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 +
- +
-     +
-    Private Sub Button1_Click(ByVal sender As System.Object, ByVal As System.EventArgs) Handles Button1.Click +
-        End +
-    End Sub +
- +
-End Class +
- +
-  +
- +
-Sample output +
-Perhaps more decorative ​that it needs to be for U3O2, but I can’t abide messy interfaces. +
-  +
-<can't insert image!+
- +
- +
- +
----------------------------------------------------------------------------------------------+