Get premium membership and access revision papers, questions with answers as well as video lessons.

Object Oriented Programming (Bbit 223) (Cisy 210) Question Paper

Object Oriented Programming (Bbit 223) (Cisy 210) 

Course:Computer Science And Business

Institution: Kenya Methodist University question papers

Exam Year:2012



TIME : 2 HOURS

Instructions:
Answer question one and any other two questions
Question One (30 marks)
List three disadvantages of C++ as compared to Java?
(5 marks)
Describe four phases of a Java program.
(4 marks)
With the use of examples (descriptions and/or sample code), explain the following object oriented concepts.
(6 marks)
Inheritance
Polymorphism
Exception
Differentiate the following terms as used by authors of Java: JVM and JRE?
(2 marks)
With the help of an example, differentiate between a one-dimensional array and a two dimensional array.
(4 marks)
Rewrite the following to reflect a syntactically correct Java Statement:
Double compound interest rate; nominal/interest rate;
(1 mark)
If (age=35) {system.out.print/n ("You are above the maximum age requirement.")
(2 marks)
Provide example code that demonstrates:
Use of methods in Java application
(2 marks)
Instantiation of classes to form objects.
(4 marks)

Question Two (15 marks)
Describe the following parts of Java Application.

Comments
(1 mark)
Access modifiers
(1 mark)
Statement
(1 mark)
Write any sample program that demonstrates modularity, Hint: must include comments that describe interaction between modules of your code.
(10 marks)
What are applets and what is an example advantage of using applets.
(2 marks)

Question Three (15 marks)
Exhibit1.
You are developing a payroll system for an SME, Mborach International. The company is in the catering sector and employs both casual and full time staff. The bulk of the workers are either "technicians" of sale-executive. Technicians are allocated a department while sales executives do not belong to any given department. The pay rates are Ksh.250 per hour for technicians and Ksh.300 for the sales executive. In calculating the net pay a flat number of hours is assumed (160 per month) and statutory deduction of PAYE at 25% is applied. However the technicians are deducted a flat fee of Ksh.500 every month (after tax) as part of their medical cover.
From the description in exhibit 1 you are required to identify three classes with at least one super class.
(3 marks)
For each of the class identify and list the various properties (data) and behaviour (methods).
(3 marks)

From the description, you are required to demonstrate method overriding using the calculation of net pay as the example.
(9 marks)

Question Four (15 marks)
Write a Java program that uses dialogue boxes to perform the following: Accept user input (E.G. the names and date of birth of a user). Using this input, the program creates a unique user name and a first time password that are shown in a dialogue box.






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers