Computer Programming
Getting started with Perl
- Accessing the Perl Programming Environment.
- Editing the Perl source code.
- General Perl CLI tutorial - to follow. 5th year and IT PLC use this instead.
- Using Perl online.
Perl Programming & Assignments
- Nuggets:
Perl Tutorials:
- http://perldoc.perl.org/index-functions.html
- http://www.yourhtmlsource.com/cgi/basicperl.html
- http://perldoc.perl.org/index-faq.html
- http://computer.howstuffworks.com/perl2.htm
Perl Books (All from O'Reilly Books:
- Learning Perl
- Perl in a Nutshell (the 'official' book)
- Programming Perl
- Advanced Perl Programming
- Perl Cookbook
- Learning Perl on Win32
- Perl for System Administration"
Flowchart Tutorials (verrrry important):
Other Tutorials:
- On-line version of Powerpoint Presentation on General Programming (Read This One At Least Once!)
- Official Perl Tutorial
- Obsolete: (C Programming):
- Programming in C, by A.D. Marshall
- The University of Strathclyde, Glasgow, Scotland.
- How Stuff Works
- cprogramming.com
- www.physics.drexel.edu
- The Guide2C book companion site (well worth visiting), particularly the internet resources page.
General items:
- An interesting story.
- NB >>> For ANSI console control look here. ANSI codes can be exceptionally useful in improving the appearance of your program on screen, and thus gaining marks in programming assignments! (C formatted)
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:
- 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'). Details to follow.
- 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:
- 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
- Assignment #1 - Barcode Shopping Reader Program with Product Database (POS application)
- Tutorial trail for Assignment #1
- 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.
- Here, Fachtna expertly demonstrates how to use the barcode scanner:
- 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
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
- Assignment #2 - Barcode Shopping Reader Program with Product Database (POS application)
- 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.
- Click here to submit a programming assignment(Non Functional: Under Repair & Test At The Moment)
Assessment 2004/5:
- Written Exam 40%
- Assignments: (2 @ 30% each = 60%)
- Assignment #1 - Election Vote Counting Program
- Assignment #2 - Number Guessing Program
- Click here to submit a programming assignment
Assessment 2003/4:
- Written Exam 40%
- The 2004 exam paper is here.
- There is a worked solution here. (PDF, 5.37MB)
- Individual pages are here and are smaller:
- The marking scheme is here.
- Assignments: (2 @ 30% each = 60%)
- Assignment #1 - Wages Calculating Program with sample solution.
- Assignment #2 - Class Marks Grading Program with sample solution.
Assessment 2002/3:
- Written Exam 40%
- The 2003 exam paper is here.
- There is a worked solution here. (PDF, 4.02MB)
- Individual pages are here and are smaller:
- The marking scheme is here.
- Assignments: (2 @ 30% each = 60%)
- Assignment #1 - Bi-lingual Coinage Calculating Program with sample solution.
- Assignment #2 -
Assessment 2001/2:
- Written Exam 40%
- The 2002 exam paper is here.
- There is a worked solution here. (PDF, 3.97MB)
- Individual pages are here and are smaller:
- Assignments: (2 @ 30% each = 60%)
- Assignment #1 - Bi-lingual Computer Program
- Assignment #2 - Lotto Numbers Program with sample solution and core flowchart.
Assessment 2000/1
- Written Exam 50% (The 2001 exam paper is here).
- Assignments (4 @ 12.5% each = 50%)
Assessment 1999/2000
- Written Exam 50% (The 2000 paper is here)
- Assignments: (4 @ 12.5% each = 50%)
- Assignment #1 - Temperature Converter Program with sample solution.
- Assignment #2 -
- Assignment #3 -
- Assignment #4 - Simple Maze Game with sample solution. (Requires a map file to run)
Assessment 1998/9
- Written Exam 50% (The 1999 paper is here)
Related:
- Module Descriptor
- Click here to submit a programming assignment
- Click here for telnet access. (Link not active yet)
- Try a few puzzles
- Murphys Law
- Programming in C, by A.D. Marshall
- The University of Strathclyde, Glasgow, Scotland.
- How Stuff Works
- cprogramming.com
- www.physics.drexel.edu
- The Guide2C book companion site (well worth visiting), particularly the internet resources page.
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:
- 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'). Details to follow.
- Please use the Term::Screen module for this program.
- The 2007 exam paper is here.
- Samples:
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
- Assignment #1 - Barcode Shopping Reader Program with Product Database (POS application)
- Tutorial trail for Assignment #1
- 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.
- Here, Fachtna expertly demonstrates how to use the barcode scanner:
- 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
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
- Assignment #2 - Barcode Shopping Reader Program with Product Database (POS application)
- 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.
- Assignment #1 - Election Vote Counting Program
- Assignment #2 - Number Guessing Program
- The 2004 exam paper is here.
- There is a worked solution here. (PDF, 5.37MB)
- Individual pages are here and are smaller:
- The marking scheme is here.
- Assignment #1 - Wages Calculating Program with sample solution.
- Assignment #2 - Class Marks Grading Program with sample solution.
- The 2003 exam paper is here.
- There is a worked solution here. (PDF, 4.02MB)
- Individual pages are here and are smaller:
- The marking scheme is here.
- Assignment #1 - Bi-lingual Coinage Calculating Program with sample solution.
- Assignment #2 -
- The 2002 exam paper is here.
- There is a worked solution here. (PDF, 3.97MB)
- Individual pages are here and are smaller:
- Assignment #1 - Bi-lingual Computer Program
- Assignment #2 - Lotto Numbers Program with sample solution and core flowchart.
- Assignment #1 - Temperature Converter Program with sample solution.
- Assignment #2 -
- Assignment #3 -
- Assignment #4 - Simple Maze Game with sample solution. (Requires a map file to run)

