0% found this document useful (0 votes)
17 views4 pages

35.ICS 2201OOP II - Paper I

This document is an examination paper for the Bachelor of Science in Information Technology at the Technical University of Mombasa, specifically for the course ICS 2201: Object Oriented Programming II. It includes instructions for candidates, five questions covering various aspects of object-oriented programming, Java tools, applets, user interfaces, and programming tasks. Candidates are required to answer question one and any two additional questions within a two-hour time frame.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

35.ICS 2201OOP II - Paper I

This document is an examination paper for the Bachelor of Science in Information Technology at the Technical University of Mombasa, specifically for the course ICS 2201: Object Oriented Programming II. It includes instructions for candidates, five questions covering various aspects of object-oriented programming, Java tools, applets, user interfaces, and programming tasks. Candidates are required to answer question one and any two additional questions within a two-hour time frame.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

TECHNICAL UNIVERSITY OF MOMBASA

INSTITUTE OF COMPUTING AND INFORMATICS


DEPARTMENT OF COMPUTER SCIENCE & INFORMATION TECHNOLOGY
UNIVERSITY EXAMINATION FOR:
BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY
ICS 2201 : OBJECT ORIENTED PROGRAMMING II
END OF SEMESTER EXAMINATION
SERIES: APRIL 2016
TIME: 2 HOURS
DATE: Pick Date Select Month Pick Year
Instructions to Candidates
You should have the following for this examination
-Answer Booklet, examination pass and student ID
This paper consists of FIVE questions. Attempt question ONE (Compulsory) and any other TWO questions.
Do not write on the question paper.

Question ONE
(a) Explain the following concepts of object oriented programming
i. Applet (2marks)
ii. Event (2marks)
iii. Object (2marks)
iv. Class (2marks)
v. Message passing (2marks)

(b) Explain the role of the following JDK tools. Use an appropriate example to demonstrate how they are
used in command line environment.
i. Java Compiler (3marks)
ii. Java interpreter (3marks)
iii. Java Debugger (3marks)

©Technical University of Mombasa Page 1 of 4


(c) Distinguish between the following:
i. Destroy() method and finalize() method. (4marks)
ii. Checkbox class and checkboxGroup (4marks)
(d) Briefly explain any three events in Java. (3marks)
Question TWO
(a) Explain ALL the components of main ( ) method as given below (3marks)
(b) Write program code segment that carry out the following:
i. Play audio clip named mySong.au. (3marks)
ii. Retrieve and display image named myPicture.jpg . (3marks)
iii. Create a command button labeled SUBMIT. (3marks)
(c) Write output generated by the code given below: (4marks)
import java.awt.*;
public class MyItems extends java.applet.Applet {
public void init() {
List lst = new List(5, true);
lst.addItem("Hamlet");
lst.addItem("Claudius");
lst.addItem("Gertrude");
lst.addItem("Polonius");
lst.addItem("Horatio");
lst.addItem("Laertes");
lst.addItem("Ophelia");

add(lst);
}
}

Differentiate between a checkBox class from a checkGroupbox class. (4marks)

©Technical University of Mombasa Page 2 of 4


Question THREE
(a) What is a constructor? With the help of an appropriate example, demonstrate how constructor is
implemented in Java (4marks)
(b) (i) Write an applet code that that display the message on the web page :
“ Wonderful to use Applets in web pages”. (5marks)
(ii) Write the code to attach the applet code on the web page. (3marks)
(iii) Write the command line statement to display the webpage in (ii) above. (2marks)
(c) State the purpose of AWT as used in Java and briefly discuss what AWT consists of.( 6 marks)

Question FOUR
(a) State any four characteristics of a good user interface. (4marks)
(b) Given below is user form for login user in a web site, Write the code that implements the interface as
given below.

(10marks)
(c) Using example, explain the function of the following layout managers on user interface components.

i. Flow layout
ii. Grid layout (6marks)

Question FIVE
(a) Differentiate:
(i). Call by value and call by reference (4 Marks)
(ii). Static variable and instance variable (4 Marks)
(b) Write a program that accepts marks for four subjects, computes the average and awards an order of merit
based on the average mark using the following classification.

Average mark Order of Merit


75-100 Distinction

©Technical University of Mombasa Page 3 of 4


65-75 Credit
50-65 Pass
0-50 Fail
(12 Marks)

©Technical University of Mombasa Page 4 of 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy