Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Advanced Programming Exam (ms315) - National University of Ireland, Galway, Exams of Computer Programming

Information about an advanced programming exam held at the national university of ireland, galway in 2009/2010. The exam is for the third year bsc in business information systems and covers the module ms315 - advanced programming. Instructions for the exam, questions, and requirements. Students are required to answer any three questions, all of which carry equal marks. The questions cover topics such as data encryption, installing and configuring php, and using arrays to solve programming problems.

Typology: Exams

2011/2012

Uploaded on 11/24/2012

divye
divye 🇮🇳

4.6

(12)

96 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Advanced Programming (ms315)
Ollscoil na hÉireann, Gaillimh
GX_____
National University of Ireland, Galway
Autumn Examinations 2009/2010
Exam Code(s)
3BF1
Exam(s)
Third Year BSc in Business Information Systems
Module Code(s)
MS315
Module(s)
Advanced Programming
Paper No.
1
Repeat Paper
External Examiner(s)
Dr. D. Ivanov
Internal Examiner(s)
Dr. T. Acton
Instructions:
Answer any THREE QUESTIONS.
All questions carry equal marks.
Duration
2 hrs
No. of Answer books
Requirements:
Handout
MCQ
Statistical Tables
Graph Paper
Log Graph Paper
Other Material
No. of Pages
6
including this page
Discipline(s)
Business Information Systems
pf3
pf4
pf5

Partial preview of the text

Download Advanced Programming Exam (ms315) - National University of Ireland, Galway and more Exams Computer Programming in PDF only on Docsity!

Ollscoil na hÉireann, Gaillimh GX_____

National University of Ireland, Galway

Autumn Examinations 2009/

Exam Code(s) 3BF

Exam(s) Third Year BSc in Business Information Systems

Module Code(s) MS

Module(s) Advanced Programming

Paper No. 1

Repeat Paper

External Examiner(s) Dr. D. Ivanov

Internal Examiner(s) Dr. T. Acton

Instructions: Answer any THREE QUESTIONS.

All questions carry equal marks.

Duration 2 hrs

No. of Answer books

Requirements :

Handout

MCQ

Statistical Tables

Graph Paper

Log Graph Paper

Other Material

No. of Pages 6 including this page

Discipline(s) Business Information Systems

OLLSCOIL NA hÉIREANN

NATIONAL UNIVERSITY OF IRELAND, GALWAY

AUTUMN EXAMINATIONS 2009/

THIRD YEAR BSc. IN BUSINESS INFORMATION SYSTEMS

EXAMINATION

(MS315) ADVANCED PROGRAMMING

Dr. D. Ivanov

Dr. T. Acton

Time Allowed: TWO hours

Answer any THREE QUESTIONS. All questions carry equal marks.

Q1.

A security company wants to transmit data outside its network, but it has

security concerns. All of the data to be transmitted take the form of 4-digit

integers. Write a script that will encrypt the data for transmission. The script

should read in a 4-digit integer entered by the user through a prompt dialog

and encrypt it using the following guidelines:

Replace each digit x by ((x * 2) mod 10). Then swap the second digit with the

third. Finally, output XHTML text displaying the encrypted integer.

A partially completed JavaScript is provided below (you do not need to

rewrite the provided code in your answer).

Encryption Script

Click Refresh (or Reload) to run this script again.

**(33.3 marks)**

Q4.

The following is a line-numbered CGI Perl script. Give a thorough

explanation of what exactly is occurring in non-blank and non-commented

lines of code.

01 #!C:\Perl\bin\perl 02 # This file is authors.pl 03 # CGI program that generates book data 04 05 use CGI qw( :standard ); 06 use DBI; 07 use DBD::mysql; 08 09 $dtd = 10 "-//W3C//DTD XHTML 1.0 Transitional//EN" 11 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; 12 13 print( header() ); 14 15 print( start_html( { dtd => $dtd, 16 title => "Authors" } ) ); 17 18 # 19 $databaseHandle = DBI->connect( "DBI:mysql:books", 20 "root", "a1ph3e", { RaiseError => 1 } ); 21 22 # 23 $query = "SELECT FirstName, LastName, AuthorID 24 FROM Authors ORDER BY LastName"; 25 26 # 27 # 28 $statementHandle = $databaseHandle->prepare( $query ); 29 $statementHandle->execute(); 30 31 print( h2( "Choose an author:" ) ); 32 33 print( start_form( { action => 'retrieve.pl' } ) ); 34 35 print( "<select name = "author">\n" ); 36 37 # 38 # 39 while ( @row = $statementHandle->fetchrow_array() ) { 40 print( "" ); 43 } 44 45 print( "\n" ); 46 47 print( submit( { value => 'Get Info' } ) ); 48 print( end_form(), end_html() ); 49 50 # 51 $databaseHandle->disconnect(); 52 $statementHandle->finish(); (33.3 marks)

Q5.

(a) The following XML document (components.xml) marks up various

components for a mechanical components retailer. The output shows the

results of a transformation of the XML document specified in an

eXtensible Style Sheet (components.xsl), and rendered by the Internet

Explorer web browser. Using the skeleton provided, write the contents of

the components.xsl stylesheet.

X40 Ratchet Drill In stock, with new X41 model due Oct 2010 R345 Huawei 9mm Drill Bit Out of stock, due in stock Sep 9th 2010 ER40 Electric Gauge Socket In stock, fragile item

The partially completed (skeleton) stylesheet is provided below (you do

not need to rewrite the provided code in your answer).

**(23.3 marks)**

… continued