SPC 2206 SPE 2206 Object Oriented Programming II Advanced Object Oriented Programming Year 2 Semester II
SPC 2206 SPE 2206 Object Oriented Programming II Advanced Object Oriented Programming Year 2 Semester II
SPC 2206 SPE 2206 Object Oriented Programming II Advanced Object Oriented
Programming Year 2 Semester II
Question One
Page 1 of 3
Question Two
Question Three
a) Write a GUI program that can display the interface of an email message
as shown below. (7 Marks)
Question Four
a) Write an Object Oriented Program in Java using single inheritance to
calculate area of a rectangle and square. (7 Marks)
b) Explain any two benefits of garbage collection. (4 Marks)
c) Using examples, describe any three built-in Packages used in Java
programs. (6 Marks)
d) Using class PersonalDetails, write a code snippet for a Java parameterized
constructor. (3 Marks)
Question Five
a) Write an OOP program in Java to create a server socket, wait for client
request, and then respond to a client that requested it. (8 Marks)
Page 2 of 3
b) Using examples, distinguish between a heavy weight and lightweight
Java containers. (4 Marks)
c) Write an Object Oriented Java program to capture three numbers,
compare them and display the largest. (8 Marks)
Page 3 of 3