Coding is one of the highest art forms achieved by mankind; an idea - just an electrical impulse - is made real in an alternate electronic universe; the created idea however, does not have physical form, and yet can change the physical world; it cannot be touched, and yet may touch all mankind.
Assessment 2013/2014
- Written Exam 2014 (40%)
- Suggested solutions 2014
- Assignment 01 (30%)
- Create a Linux command — mkuser — which takes a file of proper names and generates user-names from that data.
When finished, submit your program on paper and electronically here.
- Assignment 02 (30%)
- Create a perl web-app for an online sales form. This is in support of your main project.
When finished, submit your program on paper and electronically here.
Assessment 2012/2013
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
- Create a backend perl CGI script to validate and process the input received from the reservation form which is part of the Quinlough Hostel Project (web authoring project this year). Required functionality may be determined from the brief above and from this sample form with functioning backend script. Use this sample data to test your script.
|
Assignment-specific examples & tools
Concept demonstrator (accessible from LAN only) push-pop example Data received by the check_vacancy API Hidden input demo 01 Hidden input demo 02 Hidden input demo 03 Business::CreditCard sample usage Data received by the confirm_booking API Cookie demo 01 |
- Create a graphical point-of-sale (POS) program. For this assignment you will use barcodes and the APIs provided to implement the logical portion of a cash register. The barcodes will be interpreted by the barcode scanner; the resulting product numbers will be used to query the Quinlough shop database.
The product details are stored in a MySQL database; you will interact with the database via the APIs provided. These APIs will allow you to get product names, prices etc as well as monitor/control stock levels. The APIs (short form) are here and examples of usage are here. The long form APIs are available in class.
The program should be written as a text-only program first; when this is working you'll convert the program to a graphical display using SDL.
Assessment 2011/2012
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
- Create a backend perl CGI script to validate and process the input received from the reservation form which is part of the Waterfront Hotel Project (web authoring project this year). Required functionality may be determined from the brief above and from this sample form with functioning backend script. Use this sample data to test your script.
- Group 1: POS Application
You can use this sample flat file database to get started. Later, you can explore linking to a MySQL database.Tutorial which parallels the barcode assignment.
*Sample program with push-ing, pop-ing and tabbed output.
Group 2: Maze Game
You can use this sample maze text file to get started. Later, you can explore using OpenGL (maybe!).For an example of how this program might work, 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. Also use strict; and proper indentation! Remember to search and replace the variable names in the samples below.
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, but ask yourself "What's wrong?")
- 0405a.pl (corrected use of 2D array: uses file maze06.map)
- 0406.pl (Run this and see)
Assessment 2010/2011
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
- Create a backend perl script to validate the input received from the enrollment form which is part of the web authoring project this year. Required functionality may be determined from this sample form with functioning backend script.
- (Team challenge: 'Hangman' type game. CLI based using the perl Term::Screen module for positioning of elements on-screen.)
Assignment changed to: Number Guessing Game.
(Please note modified submission details displayed in class.)
Assessment 2009/10:
- 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
- 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 itself 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.
- 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.
- 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.
- 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)
- 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: 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: http://www.fachtnaroe.net/~fachtna/make-data-2009.pl.txt. It may be useful as another perl program sample.
- 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.
- Use the name "bookings.html" for the HTML file containing your version of the booking form.
- Booking forms so far:
- 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').
- Please use the Term::Screen module for this program.
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%
- The 2007 exam paper is here.
- Samples:
- Perl SAMPLE Programming Paper #1
with Sample 1 Solution (617K) - Perl SAMPLE Programming Paper #2
with Sample 2 Solution (4.7MB)
- 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
- The sample data (in text form) 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 for testing purpose.
- Sample output from a program run.
- You will be shown how the barcode scanner interacts with the operating system. The underlying principles are the same for similar devices.

- Assignment #2 - 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 60 people may be made.
- No booking for less than 15 people may be made, with exceptions:
- A booking of 5 of more Special Needs Visitors, with one adult per 5 SNVs is acceptable.
- 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/greenstock.dat"
- Write the record of the booking as a series of fields (even if empty) separated by colons (:)
- The first item in the record should be your username.
- Concatenate all the data with the '.' operator
- Sample Tour Booking Form with functioning script.
- View tour bookings database
- Sample Solution in PS/PDF format
Assessment 2005/6:
- Written Exam 40%
- 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
- Assignment #1 - Simple Phone Database Program with Menu Driven Control
(Click here for sample data your program might be tested with)
- This sample code will get you started. It reads the barcode database file and makes its contents usable in your program.
- The sample data (in text form) 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 for testing purpose.
- Code segments will be provided to enable the above assignments if appropriate.