Docsity

Advanced App Dev II Exam Info for Bus Info Systems, 2011/2012, Exams of Management Information Systems

Toggle sidebar
bg1
Semester 2 Examinations, 2011/2012
Exam Code(s)
2BF1
Exam(s)
BSc in Business Information Systems Year 2
Module Code(s)
MS221
Module(s)
Advanced Application Development II
Paper No.
Repeat Paper
N
Special Paper
External Examiner(s)
Dr. Danail Ivanov
Internal Examiner(s)
Dr. Christopher Duke, Mr Martin Hughes
Instructions:
Candidates are required to answer any three questions.
Marks will be awarded for commented code. Marks will be
deducted for code that does not adhere to standard Java and
JavaBean naming conventions.
Duration
2 Hrs
No. of Answer books
Requirements:
Handout
MCQ
Statistical Tables
Graph Paper
Other Material
No. of Pages
5
Department(s)
Business Information Systems
pf3
pf4

Partial preview of the text

Download Advanced App Dev II Exam Info for Bus Info Systems, 2011/2012 and more Exams Management Information Systems in PDF only on Docsity!

Semester 2 Examinations, 2011/

Exam Code(s) 2BF Exam(s) BSc in Business Information Systems Year 2 Module Code(s) MS Module(s) Advanced Application Development II Paper No. Repeat Paper N Special Paper N External Examiner(s) Dr. Danail Ivanov Internal Examiner(s) Dr. Christopher Duke, Mr Martin Hughes

Instructions: Candidates are required to answer^ any^ three^ questions.

Marks will be awarded for commented code. Marks will be deducted for code that does not adhere to standard Java and JavaBean naming conventions. Duration 2 Hrs No. of Answer books Requirements : Handout MCQ Statistical Tables Graph Paper Other Material No. of Pages 5 Department(s) Business Information Systems

Please note:

In the Miscellaneous tab of the BlueJ preferences dialog, make sure that

‘Show unit testing tools’ and ‘Show teamwork controls’ are ticked in

the ‘Optional tool settings’ section.

For every class that you create, include your name and ID number as

comments in the first few lines of the code

Answer any three questions

Question 1: 33 Marks Part A 9 Marks With reference to class members (methods and instance variables), explain how access modifiers can be used to implement encapsulation. Part B 24 Marks Download ‘Q1_Part_B’ from the MS221SumerExam repository and compile it. It contains a class called OneMethod which has a single unimplemented method called getEvent that returns a String. Given an integer month (e.g. 1 is January, 12 is December) we want to implement this method so that it checks whether an Astronomical Event will occur in the selected month. The table below shows the months of the year and the associated astronomical event: Month Astronomical Event 3 or 9 “Equinox” 6 or 12 “Solstice” 1, 2, 4, 5, 7, 8, 10, 11 “No event” Any number outside the range of 1 to 12 “Invalid Month” Your task is to implement the getEvent method so that when we call getEvent(12) the method returns the String “Solstice”, when we call getEvent(4) it returns the String “No event” and so on. You should write a series of positive and negative Unit Tests in the OneMethodTest class that ensure that your getEvent method is working as you would expect it to. Continued overleaf

Question 4: 33 Marks Part A 10 Marks Define the terms ‘coupling’ and ‘cohesion’. Explain why Java programmers aim to write classes that are loosely coupled and highly cohesive. How does using responsibility driven design help them achieve this aim? Part B 15 Marks Download ‘Q4_Part_B’ from the MS221SumerExam repository and compile it. Write a walkthrough that provides a line by line account of what happens when the main method in the Calculator class runs. Your walkthrough should follow the logical flow of the program and highlight the following:

  • Any assignment statements
  • Any conditional statements
  • Any arithmetic operators
  • Any output to the console
  • Any changes to the values of local or instance variables
  • Any method invocations (calls)
  • Anything else you feel has an effect on the program Part C 8 Marks Add javadoc comments to the Calculator class you downloaded in Part B. Ensure you have a comment for the class itself and one for each method. Use the following symbols where appropriate: @author @version @param @return End