Autumn Examinations 2008/2009: Exam Information and Instructions, Exams of Management Information Systems

Information about the autumn examinations in 2008/2009, including exam codes, modules, and instructions for candidates. The exams cover masters of business studies in electronic commerce and higher diploma in systems analysis, with interactive programming as a module. Candidates are required to answer multiple-choice questions and set rates for currencies in the autumn class.

Typology: Exams

2011/2012

Uploaded on 11/24/2012

adya
adya 🇮🇳

4

(21)

118 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
!
Autumn Examinations 2008/ 2009
Exam Code(s)
1AE1, 1BD1, 1BD3
Exam(s)
Masters of Business Studies in Electronic Commerce
Higher Diploma in Systems Analysis full-time
Higher Diploma in Systems Analysis part-time
Module Code(s)
MS841
Module(s)
Interactive Programming II
Paper No.
Repeat Paper
External Examiner(s)
Professor H. van der Heijden
Internal Examiner(s)
Professor J. F. Collins
Mr. Seamus Hill
Instructions:
Candidates are required to answer:
Section A (20 Marks) Answer all 10 parts of section A,
This section consists of 10 multiple-choice questions all of which
should ideally be attempted. Answers are to be written on the MCQ
sheet provided, NOT on the Examination paper.
Section B (80 Marks) Answer Any Two Questions
3 hrs
Accountancy & Finance
Requirements:
MCQ
Yes, Type a-d
!
pf3
pf4
pf5
pf8

Partial preview of the text

Download Autumn Examinations 2008/2009: Exam Information and Instructions and more Exams Management Information Systems in PDF only on Docsity!

Autumn Examinations 2008/ 2009

Exam Code(s) 1AE1, 1 BD1, 1 BD Exam(s) Masters of Business Studies in Electronic Commerce Higher Diploma in Systems Analysis full-time Higher Diploma in Systems Analysis part-time Module Code(s) MS84 1 Module(s) Interactive Programming II Paper No. Repeat Paper External Examiner(s) Professor H. van der Heijden Internal Examiner(s) Professor J. F. Collins Mr. Seamus Hill Instructions: Candidates are required to answer: Section A (20 Marks) Answer all 10 parts of section A, This section consists of 10 multiple-choice questions all of which should ideally be attempted. Answers are to be written on the MCQ sheet provided, NOT on the Examination paper. Section B (80 Marks) Answer Any Two Questions Duration 3 hrs Department(s) Accountancy & Finance Course Co-ordinator(s) Requirements : MCQ Yes, Type a-d

Section A (20 Marks)

Attempt all 10 questions

Mark your answers on the MCQ sheet provided

  1. A pair of classes are deemed “unrelated classes” if _________________. a) they define completely different objects b) they are in different packages c) they are unconnected by inheritance d) they are written by different programmers
  2. Which of the following is a scenario that illustrates the benefit of polymorphism? a) A function can be given a meaningful name without having to change it to accommodate to rules against having multiple methods of the same name in a single function. b) The extension of a class makes the member variables of the parent available to the class, and saves the time of having to redefine these member variables. c) The introduction of a new class to an already functioning framework of classes using inheritance only requires a user to implement the new class by extending a parent class and adding the appropriate method d) The extension of a class does not require the programmer to write a method that is defined in the parent. The class instead can call the parent method whenever it wants to.

3) How would you define a Java array?

a) a collection of data values of different types

b) a collection of data values of the same type

c) a collection of characters that incidentally form a string

d) a collection of primitive data types

4) Which of the following declares an array of integers of size 20?

a) int[] a = int[20];

b) int[] a = new int[20];

c) int a = new int[19];

d) int a[] = new int[19];

Section B (80 Marks)

Answer Any TWO Questions

Question 2

Review the following class and explain the purpose of the class and how it works. Explain, line by line, the purpose of the class and each of its methods. Use the line numbers for reference purposes. 1 public class Autumn { 2 3 private String[] curNames; 4 private double[] curRates; 5 private int count; 6 7 public Autumn() { 8 count = 0; 9 curNames = new String[ 20 ]; 10 curRates = new double[ 20 ]; 11 } 12 13 public void setRate( String currencyName, double rate ) { 14 15 int index = - 1; 16 17 for ( int i = 0; i < count; i++ ) { 18 if ( curNames[ i ].equals( currencyName ) ) { 19 index = i; 20 } 21 } 22 23 if ( index != - 1 ) { 24 25 curRates[ index ] = rate; 26 } else { 27 28 if ( count == curRates.length ) { 29 30 enlarge(); 31 } 32 33 curNames[ count ] = currencyName; 34 curRates[ count ] = rate; 35 count++; 36 } 37 } 38 ...continued

39 public double exchange( String fromCurrency, String toCurrency, 40 double amount ) { 41 42 double retVal = - 1.0; 43 44 if ( fromCurrency.equals( toCurrency ) ) { 45 46 retVal = amount; 47 } else if ( fromCurrency.equals( "dollar" ) ) 48 49 int index = currencyLocation( toCurrency ); 50 51 if ( index == - 1 ) { 52 53 System.out.println( toCurrency + " cannot be found in the " + 54 "exchange rates." ); 55 } else { 56 retVal = amount * curRates[ index ]; 57 } 58 59 } else if ( toCurrency.equals( "dollar" ) ) { 60 61 int index = currencyLocation( fromCurrency ); 62 63 if ( index == - 1 ) { 64 System.out.println( fromCurrency + " cannot be found in the " 65 + "exchange rates." ); 66 } else { 67 retVal = amount / curRates[ index ]; 68 } 69 70 } else { 71 72 int index1 = currencyLocation( fromCurrency ); 73 int index2 = currencyLocation( toCurrency ); 74 boolean found = true; 75 76 if ( index1 == - 1 ) { 77 System.out.println( fromCurrency + " cannot be found in the " 78 + "exchange rates." ); 79 found = false; 80 } 81 82 if ( index2 == - 1 ) { 83 System.out.println( toCurrency + " cannot be found in the " 84 + "exchange rates." ); 85 found = false; 86 } ...continued

Question 3

Part a)

Given the class Tester, illustrate how the pass-by-value scheme works for the code segment given. Your answer should include a state of memory diagram to show the flow of execution and allocation and deallocation of memory. public class Tester { public void myMethod( int one, double two){ one = 25; two = 35.4; } } Tester tester; int x,y; tester = new Tester(); x = 10; y = 20; tester.myMethod(x,y); System.out.println(x + " " + y);

(10 Marks)

Part b)

Write a program that replies either Leap Year or Not a Leap Year, given a year. Use the following code to calculate whether a year is a leap year or not. if ( year % 4 == 0 ) { if ( year % 100 != 0 ) { leap = true ; } else if ( year % 400 == 0) { leap = true ; } } You answer should consists of two files, a programmer defined class called LeapYear class, which can determine whether or not a given year is a leap year. And an application class called IsLeapYear, to determine whether a given year is a leap year or not, this main class uses the reusable class LeapYear to determine the “leapness” of the year.

(30 Marks)

Question 4

Part a)

In relation to object-oriented programming with JAVA, detail your understanding, using examples/analogies where appropriate, of each of the following: i. Polymorphism, ii. Overloaded Constructors iii. Inheritance iv. Pass by reference and pass by value.

(20 Marks)

Part b)

Define each of the following terms exception thrower , exception catcher and exception propagator.

(5 Marks)

Part c)

Briefly discuss, using examples/analogies where appropriate, the following statement - Public methods of a class determine the behaviour or its instances. Internal details are implemented by private methods and private data members.

(15 Marks)