[Year 12 SofDev] U4O1 - Coding help

Kent Beveridge kbeveridge at stbc.vic.edu.au
Thu Jul 18 08:42:44 EST 2013


My boys used a selection of check boxes incorporated into the last outcome and will be carrying this through to the next one for the implementation phase.  .csv files of choices also are used. We also use python here.
KB.

Kent Beveridge
ICT Coordinator & Maths teacher

On 17/07/2013, at 8:31 PM, "Matheson, Heath A" <Matheson.Heath.A at edumail.vic.gov.au<mailto:Matheson.Heath.A at edumail.vic.gov.au>> wrote:

Hi Peter,

I’m not sure what language you are using but for we use python and tkinter. I would have the order displayed in a listbox and a delete button with a function such as:

def delete_item():
    try:
        # get selected line index
        index = listbox1.curselection()[0]
        listbox1.delete(index)
    except IndexError:
        pass

IMO, validation is an important skill to assess in this outcome. I would suggest a file that contains a list of the menu items that is loaded into an appropriate selection object such as a drop down list (good validation). I would then have quantity as a separate entry. The quantity entry box would also have a type and range check put on it. A button would add the selected item and quantity to an orders 2d array.
For custom items or notes you could have an entry box and a separate button to place additional items into the order.

Here is something similar we made in my class a couple of years ago:
<image003.jpg>

Hope this helps you out. I’m sure others will have some other ideas. :)
Cheers,
Heath Matheson
Mount Beauty Secondary College


From: sofdev-bounces at edulists.com.au<mailto:sofdev-bounces at edulists.com.au> [mailto:sofdev-bounces at edulists.com.au] On Behalf Of Langham, Peter P
Sent: Wednesday, 17 July 2013 1:00 PM
To: Year 12 Software Development Teachers' Mailing List
Subject: [Year 12 SofDev] U4O1 - Coding help

Good afternoon,

I’ve been working on the Trentham Spud Inn case study available on edulists, created by Elizabeth Wells, as a guide and as practice material for my teaching for U4O1.

In short, it’s a Pizza Restaurant ordering system that requires the following tasks:


-          Allow the waiter/waitress to enter the table’s order

-          Allow the waiter/waitress to confirm the order with the diners at the table – removing or adding any requested items.

-          Allow special requests to be appended to the order or to individual dishes.

-          Save all of the collected data into a text file

What is the best way to remove an item from the order?

I’ve been treating the order as one large string, where the diners may place an order as follows:

String Order = “1 x Spudtastic, 1 x Butternut Pumpkin and fresh figs, 1 x Chicken breast and white truffle oil”

I think I’ll use a splitting function to separate the string at each comma so we’d end up with

String Order[0] = 1 x Spudtastic
String Order[1] = 1 x Butternut Pumpkin and fresh figs
String Order[2] = 1 x Chicken breast and white truffle oil

To remove the Butternut Pumpkin and fresh figs order

String Order[1] = String Order[2]
String Order[2] = Null or “”

Is there a better way to do this?

Thanks

Peter Langham
Narre Warren South P12



Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.

Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.



Click here<https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==> to report this email as spam.

_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
St. Brigid's College
97 Robinson Street, Horsham VIC 3400
T 03 5382 3545   F 03 5382 0757
ABN 72 749 438 155
www.stbc.vic.edu.au<http://www.stbc.vic.edu.au/>
        [http://library.stbc.vic.edu.au/StBCLogo.jpg]
P Please consider the environment before printing this email or attachment.
IMPORTANT! This email and any attachments may be confidential. If received in error, please contact us and delete all copies. St. Brigid's College does not represent or warrant that the attached files are free from computer viruses or other defects. The attached files are provided, and may only be used, on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not. The liability of St. Brigid's College is limited in any event to either the resupply of the attached files or the cost of having the attached files resupplied. Any representations or opinions expressed in this email are those of the individual sender, and not necessarily those of St. Brigid's College.


This message has been scanned for malware by Websense. www.websense.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20130717/16e39748/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 13548 bytes
Desc: image003.jpg
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20130717/16e39748/image003-0001.jpg 


More information about the sofdev mailing list