Professional Documents
Culture Documents
Kingston Paper
Kingston Paper
It describes
a class that references one or more objects of other classes in instance variables
I. Describe Composition using an example scenario. Draw a class diagram to support your
answer and provide the implementation using C#.Net.
II. Define the composite pattern by drawing a class diagram. The class diagram should
contains the Client class,Component class,Composite class and the Leaf class .
III. ABC Bank has a bank manager and three accountants and two cashiers. Below mentioned
the details of these employees,
All the Accountants are working under the bank manager and Cercy(Cashier) is working under
the Mark(Accountant) and Lily(Cashier) is working under the Brayn(Accountat).
ABC bank is asking you to develop a system to display the details of all employees and your
system should display which employee is working under which employee clearly.
Which design pattern is the most suitable one for the above mentioned scenario?
Using the above mentioned Employee interface write the Java code to create the required
programme.
1. Which of following is shared structure of a set of similar objects
Encapsulation
A Class
Inheritance
None of Above
An Interface
A Class
An Abstract Method
none of above
Java
SmallTalk
C++
Kotlin
Classes
Access Modifiers
Interfaces
Method signature
every where
in sub class
extends
extend
implement
inherit
Double
String
Int
Class
Yes
No
View Answer
Anonymous class
Nested class
Parent class
Abstract class
True
False
Andrea Ferro
Dennis Ritchie
Adele Goldberg
Alan Kay
Polymorphism
Inheritance
Abstraction
Encapsulation
C lanaguage
Java
Kotlin
C++
Static function
Friend function
Const function
Virtual function
Errors
Exceptions
Maths
19. Which among the following handles the undefined class exception in
program?
ClassNotFound
NoClassException
ClassFoundException
20. How many catch blocks you can use with single Try block?
Only 2
Only 1
Maximum 256
As many as required
(MCQ 20 * 1 = 20 marks , 1 Eassy Question =30 marks)