Docsity

Transformation - Advanced Programming - Exam, Exams of Computer Programming

Toggle sidebar
bg1
Ollscoil na hÉireann, Gaillimh
GX_____
National University of Ireland, Galway
Semester 1 Examinations 2008/2009
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)
Professor H. van der Heijden
Internal Examiner(s)
Professor J. F. Collins
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
excluding this page
Department(s)
Accountancy and Finance
pf3
pf4
pf5

Partial preview of the text

Download Transformation - Advanced Programming - Exam and more Exams Computer Programming in PDF only on Docsity!

Ollscoil na hÉireann, Gaillimh GX_____

National University of Ireland, Galway

Semester 1 Examinations 2008/

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) Professor H. van der Heijden

Internal Examiner(s) Professor J. F. Collins

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 excluding this page

Department(s) Accountancy and Finance

OLLSCOIL NA hÉIREANN

NATIONAL UNIVERSITY OF IRELAND, GALWAY

SEMESTER 1 EXAMINATIONS 2008/

THIRD YEAR BSc. IN BUSINESS INFORMATION SYSTEMS

EXAMINATION

(MS315) ADVANCED PROGRAMMING

Professor H. van der Heijden

Professor J. F. Collins

Dr. T. Acton

Time Allowed: TWO hours

Answer any THREE QUESTIONS. All questions carry equal marks.

Q1.

A university instructor requires a JavaScript program to determine the average

percentage mark for a class of students taking an examination in a particular

subject. The number of

students in the class varies

from year to year. Write the

program to input a mark

between 0 and 100 inclusive

(e.g. 63.4, or 45) for each

student in the class, and output

the class average as indicated below.

The partially completed script is

provided (you do not need to rewrite the

provided code in your answer).

Q1: Average Marks

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

(33.3 marks)

(b) The following script has 5 distinct syntactical or logical errors on 5

separate lines. The purpose of the script is to prompt the user to enter 5

numbers and to display the largest and second largest numbers only.

Indicate the line numbers where the errors are located, and give the correct

line of code in each case.

01 02 04 05 07 5 Errors Here 08 09 32 33 34 (10 marks)

Q3.

Describe some of the purposes and usage of each of the following

technologies. In each case give a short example (in code) of a business-

related implementation.

(a) Perl

(b) Cascading Style Sheets

(33.3 marks)

Q4.

The output below shows a registration form html document (form.html)

displaying in a web browser: when the user clicks the ‘Register’ button, the

details entered on the form are handled by a php script (form.php) on the web

server.

The line-numbered contents of form.php are below. Give a full and

thorough explanation of what is occurring in the code.

01 03 04 05 06 07 08 09 Form Validation 10 11 12 13 14 20 INVALID PHONE NUMBER:

Q5.

Using a programming language of your choice, employ an array to solve the

following problem: write a script or program to read in 10 numbers, each of

which must be between 1 and 100. As each number is read, display it only if it

is not a duplicate of a number that has already been read. Use the smallest

possible array to solve this problem.

Example output is below, for a script written in Javascript and output in a web

browser – if the user enters 6 7 6 7 8 9 7 2 3 4 the output may resemble:

If the user enters 1 2 2 2 3 4 5 6 1 7 8 9 the output may resemble:

(33.3 marks)