Computer Programming
Getting started with Perl
Perl Nuggets:
Perl Tutorials:
Perl Books (All from O'Reilly Books):
Flowchart Tutorials (verrrry important):
Other Tutorials:
General items:
Assessment 2009/10:
- Written Exam 40%
- Will be posted afterwards
- Assignments: (2 @ 30% each = 60%)
For each assignment submit:
- Standard Cover Sheet
- Program Listing (print out)
- Flow Chart (should be completed first)
- Screen shots of sample program runs etc
- Any other appropriate items in support of your assignment
- also
- Submit
...your script electronically... (temporarily postponed)
- Make ...an oral submission...
- Assignment #1: POS Program.
Use the link above to view the Perl tutorial pages explaining the skills required for the assignments.
- (Last updated: 20091209-15:02)
- Assignment #1 - Barcode Shopping Reader Program with Product Database (POS application)
- Tutorial trail for Assignment #1
- The sample data (in plaintext text format) to use in your database file. The program expects this file to be called "barcodes.dat" unless you choose to change it.
- These are sample barcodes (in PDF format) for testing purpose.
- Sample output from a program run.
- A visual demonstration on how to use the barcode scanner:
- This model of barcode scanner plugs into the PS/2 keyboard port at the rear of the computer.
The keyboard then plugs into the scanner. This is known as a keyboard wedge.
- The scanner it self can have its mode of operation changed by scanning codes from the manual.
For example, whether the scanner transmits a CR, an LF or a CR+LF is controlled this way. This influences whether the chop function will be required. Also, the scanner is pre-set by this means to read EAN-13 barcodes. -
- The barcode scanner (typically) uses red light
to pick up the barcode from the object and essentially 'types' the code into whatever program is running.
- This is a typical EAN-13 barcode:

- Assignment #2: Maze Game. (Almost) identical to the 4th assignment from 2000 and the second assignment from 2008.
- (Last updated: 20100415-12:26)
- For an example of how this program might work in actuality, log in to the programming server and change directory to /home/public - within that folder is a pre-compiled binary of a C program that largely does as this years assignment is required to do. The file is called amazing.bin and can be directly executed within that directory using the command ./amazing.bin - your character is the @ symbol. If you have read the brief you'll know the meaning of the other symbols, as well as the purpose of the program.
- Please use the Term::Screen module for this program.
- Sample Steps:
- 0401.pl ("Hello World" using Term::Screen)
- 0402.pl (put a map on the screen quickly: uses file maze04.map)
- 0403.pl (control the position of a character on screen)
- 0403.pl.txt (doing position checking in the maze)
- 0404.pl (faulty!)
- 0405a.pl (corrected use of 2D array: uses file maze06.map)
Assessment 2008/9:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
For each assignment submit:
- Standard Cover Sheet
- Program Listing (print out)
- Flow Chart (should be completed first)
- Screen shots of sample program runs etc
- Any other appropriate items in support of your assignment
- Submit your script by email.
- Assignment #1, Culloughtys Country Hostel: Reservation Form validation program
- Reservation form from which to validate input with demonstration script.
- Read up on checksums!
- Perl Business::CreditCard module.
- After a sanity check on the user input data the following criteria to a booking will apply:
- No booking for more than 12 people may be made
- Bookings may only be made for the following month.
- Bookings of children only are not acceptable.
- Only VISA credit cards are accepted.
- The card holders name should have two or more parts.
- The credit card number should be potentially viable.
- The card expiry date should be potentially viable.
- The completed booking should be stored in the file "/home/public/hosteldatabase2009.dat"
- Open the database file in append data (">>") mode.
- Save each valid booking record as a series of fields using colons (:) as the delimiter.
- Separate each record in the database by an EOL. Therefore each line is a record.
- Concatenate all the data fields with the '.' operator
- The first field in the booking record should be your username.
- View the reservations database.
- Click below to test your form & script combination:
|
|
|
|
|
| The reservation database is now closed to further entries. |
- Assignment #2, Culloughtys Country Hostel: Reservation database manipulation program (Version 89)
- (Last updated: 20090304-02:38)
- Write a script that accepts one of a number of input options, as indicated by a radio-button control, and responds appropriately.
- Provide as many as possible of the features listed below. Start with the easier tasks and build from there. Many of the code elements are re-usable allowing you to create later features from earlier ones.
- Possible input options/requests include:
- Duplication for further processing of the previously stored database ("/home/public/hosteldatabase2009.dat") under a new name for processing
- Where possible remove records from the copied database that are obviously incorrect eg:
- e.g.
- Remove records with empty fields
- Remove records with more than 12 people booked
- Remove records with invalid dates
- ...
- Retrieve a booking by name for printing or deleting
- Retrieve a booking by email for printing or deleting
- Retrieve all of 'todays' bookings
- Perform a series of statistical/data processing calculations
- A program to generate more sample data for processing is here: https://www.fachtnaroe.net/~fachtna/make-data-2009.pl.txt. It may be useful as another perl program sample.
- ...more may follow...
- Click below to test your customised form & script combination:
|
|
|
|
|
| Apart from the reservation database from Assignment #1, you may also use /home/public/00-2009-sample-reservations.dat (250 records), /home/public/01-2009-sample-reservations.dat (1000 records), /home/public/comparative.dat (1000 records) and /home/public/00-comparative-2009.dat (250000 records). |
Assessment 2007/8:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
For each assignment submit:
- Standard Cover Sheet
- Program Listing
- Flow Chart (should be completed first)
- Screen shots of sample program runs etc
- Any other appropriate items in support of your assignment
- Assignment #1, Option 1: Perl CGI program to verify user input - Tour Booking. Cross reference to Web Authoring
- After a sanity check on the user input data the following criteria to a booking will apply:
- No booking for in excess of the guide figure from the form may be made.
- No booking for less than 10 people may be made
- Bookings may only be made for the following month.
- Bookings of children only are not acceptable.
- The completed booking should be stored in the file ">> /home/public/fitzgerald2008.dat"
- Write the record of the booking as a series of fields (even if empty) separated by colons (:) as the delimiter
- Concatenate all the data with the '.' operator
- The first item in the record should be your username.
- Sample Tour Booking Form with functioning script.
- View the tour bookings database.
- Assignment #1, Option 2: - Barcode Shopping Reader Program (Assignment #1 from 2006/7).
- Assignment #2, Option 1: - Maze Game. (Almost) identical to the 4th assignment from 2000.
- For an example of how this program might work in actuality, log in to the programming server and change directory to /home/public - within that folder is a pre-compiled binary of a C program that largely does as this years assignment is required to do. The file is called amazing.bin and can be directly executed within that directory using the command ./amazing.bin - your character is the @ symbol. If you have read the brief you'll know the meaning of the other symbols, as well as the purpose of the program.
- Please use the Term::Screen module for this program.
- Sample Steps:
- 0401.pl ("Hello World" using Term::Screen)
- 0402.pl (put a map on the screen quickly: uses file maze04.map)
- 0403.pl (control the position of a character on screen)
- 0403.pl.txt (doing position checking in the maze)
- 0404.pl (faulty!)
- 0405a.pl (corrected use of 2D array: uses file maze06.map)
- Assignment #2, Option 2: - Bomb Defuser Game (FKA 'hangman').
Assessment 2006/7:
This years assessment structure will not vary from that of previous years. However, the language taught is to change again. Once we programmed in a beautiful language called Pascal. Then we changed to C. Now we change again to a 'new' language: Perl (see above).
Use the link above to view the Perl tutorial pages explaining the skills required for the assignments.
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
For each assignment submit:
- Standard Cover Sheet
- Program Listing
- Flow Chart
- Screen shots of sample program runs etc
- Any other appropriate items in support of your assignment
Assessment 2005/6:
- Written Exam 40%
- The 2006 exam paper is here.
- There is a worked solution here. (PDF, 226K)
- Assignments: (2 @ 30% each = 60%)
For each assignment submit:
- Standard Cover Sheet
- Program Listing
- Flow Chart
- Screen shot of sample program run
- Any other appropriate items in support of your assignment
- Code segments will be provided to enable the above assignments if appropriate.
- Click here to submit a programming assignment(Non Functional: Under Repair & Test At The Moment)
Assessment 2004/5:
- Written Exam 40%
- The 2005 exam paper is here.
- There is a worked solution here. (PDF, 385K)
- Assignments: (2 @ 30% each = 60%)
- Click here to submit a programming assignment
Assessment 2003/4:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
Assessment 2002/3:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
Assessment 2001/2:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
Assessment 2000/1
- Written Exam 50% (The 2001 exam paper is here).
- Assignments (4 @ 12.5% each = 50%)
- Assignment #1 -
- Assignment #2 -
- Assignment #3 -
- Assignment #4 -
Assessment 1999/2000
- Written Exam 50% (The 2000 paper is here)
- Assignments: (4 @ 12.5% each = 50%)
Assessment 1998/9
- Written Exam 50% (The 1999 paper is here)
Related:
Last updated: 20100729-07:46
|