0% found this document useful (0 votes)
75 views14 pages

IT3101 - Object-Oriented Systems Development: University of Colombo School of Computing

The document is a multiple choice question paper for an exam on object-oriented systems development. It provides instructions for the exam, including that it is 1.5 hours long, contains 35 multiple choice questions, and answers should be marked on the provided answer sheet. It then lists the first 5 questions which ask students to fill in blanks with appropriate terms related to actors, use cases, aggregation, state transitions, and include relationships in UML.

Uploaded by

Nimsara De Zoysa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views14 pages

IT3101 - Object-Oriented Systems Development: University of Colombo School of Computing

The document is a multiple choice question paper for an exam on object-oriented systems development. It provides instructions for the exam, including that it is 1.5 hours long, contains 35 multiple choice questions, and answers should be marked on the provided answer sheet. It then lists the first 5 questions which ask students to fill in blanks with appropriate terms related to actors, use cases, aggregation, state transitions, and include relationships in UML.

Uploaded by

Nimsara De Zoysa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 14

UNIVERSITY OF COLOMBO SCHOOL OF COMPUTING

(Successor to the Institute of Computer Technology (ICT))


UNIVERSITY OF COLOMBO, SRI LANKA

DEGREE OF BACHELOR OF INFORMATION TECHNOLOGY (EXTERNAL)


Academic Year 2002/2003 – 2nd Year Examination – Semester 3

IT3101 – Object-Oriented Systems Development


PART 1 - Multiple Choice Question Paper

22nd February, 2003


(ONE AND A HALF HOURS) 

Important Instructions: 
 The duration of the paper is 1 ½ (one and a half) hours.

 The medium of instruction and questions is English.

 The paper has 35 questions and 13 pages.

 All questions are of the MCQ (Multiple Choice Questions) type.

 All questions should be answered.

 Each question will have 5 (five) choices with one or more correct answers.

 All questions will carry equal marks.

 There will be a penalty for incorrect responses to discourage guessing.

 The mark given for a question will vary from –1 (All the incorrect choices
are marked & no correct choices are marked) to +1 (All the correct choices
are marked & no incorrect choices are marked).

 Answers should be marked on the special answer sheet provided.

 Note that questions appear on both sides of the paper.


If a page is not printed, please inform the supervisor immediately.

 Mark the correct choices on the question paper first and then transfer them
to the given answer sheet which will be machine marked. Please
completely read and follow the instructions given on the other side
of the answer sheet before you shade your correct choices.

1
In questions 1-5, fill in the blanks with the most appropriate answer.

1) ………….. are not parts of the system. They represent anyone or anything that must interact with
the system.

(a) Use Cases (b) Actors (c) Classes


(d) Components (e) Packages

2) …………. represent the capabilities which will be provided to actors by the system.

(a) Use Cases (b) Objects (c) States


(d) Classes (e) Packages

3) …………. is a variation of simple aggregation. It is a strong type of aggregation.

(a) Component aggregation (b) Inheritance (c) Multiple


inheritance
(d) Composition (e) Association

4) A/An ……………. represents a change from an originating state to a successor state.

(a) association (b) aggregation (c) generalization


(d) dependency (e) state transition

5) …………. relationship is used to show optional behaviour that is run only under certain conditions
such as triggering an alarm.
(a) Inheritance (b) Include (c) Aggregation
(d) Association (e) Extends

6) Which of the following statements is/are correct regarding Visual Modelling with UML and Rational
Rose?

(a) Visual Modelling helps organize, visualize and understand complexity.


(b) Visual Modelling has a common vocabulary called the Unified Modelling
Language.
(c) Rational Rose is the only object oriented CASE tool that supports UML.
(d) Models created with UML can be used to build systems with technologies like COM
+ & Java beans.
(e) Latest Rational Rose versions allow one to publish Rose models in the web.

7) Which of the following statements is/are correct regarding Rational Unified Process (RUP)?

(a) It can be used with UML to develop high quality software.


(b) It is an iterative process having the flexibility to accommodate new requirements or
tactical changes in business objectives.
(c) It does not focus on early development of software architecture.
(d) Inspection phase of RUP establishes a project plan and a sound architecture.
(e) The transition phase of RUP typically starts with a beta release of the system which
is then replaced with the production of the system.

2
8) 7) The following statements are related to Use Case modelling. Identify the correct statements.

(a) Actors represent anyone or any thing that must interact with the system.
(b) The collection of Use Cases for a system does not constitute all the defined ways in
which the system may be used.
(c) Extends relationship shows the optional behavior of a Use Case.
(d) The flow of events for a Use Case is a description of events needed to accomplish the
required behaviour of the Use Case.
(e) The following respective steps can be used to assign a Use Case stereotype in
Rational Rose:
(i) Right click the Use Case in the browser,
(ii) Select the corresponding stereotype.

9) 8) Which of the following statements is/are correct regarding identifying Classes, Packages and
drawing a Class diagram?

(a) A Class is a description of a group of objects with common properties, common


behaviour, common relationships to other objects and common semantics.
(b) A Stereotype is a mechanism one can use to categorize his classes.
(c) Entity and Boundary are the two primary Class stereotypes in UML.
(d) Packages are used to group the Classes together for ease of use, maintainability and
reusability.
(e) A Class diagram describes the types of objects in the system and the various kinds of
static relationships which exist among them.

10) A Class in a problem domain has attributes as well as behaviour and some times, can be in different
states. In a Library system, the “Copy” is identified as an Entity Class in the problem domain. From
the following, identify the statement which represents the object, an attribute, the behaviour and a
state of the class respectively.

(a) Quatran2000, borrowed, price, checkBorrowable.


(b) checkBorrowable, Quatran2000, borrowed, price
(c) Quatran2000, price, checkBorrowable, borrowed
(d) Quatran2000, checkBorrowable, borrowed, price.
(e) borrowed, Quatran2000, price, checkBorrowable

11) Which of the following statements is/are correct?

(a) In Object Oriented systems, it is possible to connect all the nearly independent
views of a system into one semantic whole.
(b) A model can be used as a template that guides us in constructing a system.
(c) In Rational Rose, it is possible to include several different models if needed.
(d) Object Oriented models are easier to maintain when the user requirements are changed,
because it maps well to the real world.
(e) The Use Case model is used in logical view to represent the system’s intended functions
and environment as seen by its end users.

3
12) Consider the following Class diagram:

Customer Room Room Rate


1..* 1
1
1

0..* Payment
0..*
1
Reservation
1

Cash Credit TCheque Corporate Billing

Which of the following is/are true regarding the above diagram?

(a) One Reservation object is related to exactly one Customer object.


(b) A Room has a collection of zero or more Reservations.
(c) Payment is a specialized class of Cash, Credit, TCheque and Corporate Billing classes.
(d) One Reservation object is related to one Payment object.
(e) One Customer object is related to exactly one Reservation object.

13) Which of the following statements is/are correct regarding ‘Elaboration phase’ in the Rational
Unified Process?

(a) Primary objective of this phase is to establish the project’s software scope and boundary
conditions.
(b) Emphasis is placed on managing resources and controlling operations to optimise costs,
schedules and quality.
(c) Project plan is developed during this phase.
(d) High risk elements of the projects are eliminated during this phase.
(e) Class diagrams and State Transition diagrams are created during this phase.

14) Consider the following statements.


(i) In order for one class to send a message to another on a sequence diagram or collaboration
diagram, there must be a relationship between the two classes.
(ii) Associations in class diagrams are always bi-directional.
(iii) In UML, bi-directional associations are drawn either with arrowheads at both ends or without
arrowheads at all.
Which of the above statements is/are correct?

(a) Only (i) (b) Only (ii) and (iii) (c) Only (i) and (ii)
(d) Only (iii) (e) Only (i) and (iii)

4
15) Consider the following sequence diagram drawn for a Hotel Reservation System.

Reservation Rs1-Reservation : Rm1-Room C1-Customer


: Receptionist Form Reservation : Room : Customer
1: Enter Customer Details
2: checkRoomAvailable( ) 3: getAvailableRooms( )

4: Select a room

5: Confirm

6: makeReservation( )7: allocateRoom( )

8: setCustomer( )

Which of the following is/are correct regarding the above diagram?

(a) Receptionist is the actor responsible for the Use Case.


(b) Reservation form, Reservation ,Room and Customer are entity classes identified for the
entire hotel reservation system that is to be modelled.
(c) makeReservation is the only operation belonging to the Reservation class.
(d) getAvailableRooms and allocateRoom are methods that must be implemented by the
Room class.
(e) allocateRoom and setCustomer are methods that must be implemented by the
Reservation class.

16) Which of the following is/are true with regard to aggregation?

(a) An aggregation is a stronger form of association.


(b) Whether a relationship is an association or an aggregation is often domain dependent.
(c) Aggregation relationships typically are not named. They are read using one of the words
“has”, “part of” or “contains”.

5
(d) The following is an example of aggregation containment in UML:
1 1..*

School Student
(e) Each component in an aggregation can belong to just one whole.

17) Select from among the following, the correct statement(s) regarding C++.

(a) Inline functions may increase the execution speed of a program.


(b) C++ compiler is stronger in array bounds checking.
(c) Polymorphism can be implemented via virtual functions.
(d) Friend function of a class is a member function.
(e) Member functions, unless specified otherwise, are, by default, private.

18) What would the output generated be from the following program?
# include <iostream>
using namespace std;
void result (int=3, float= 10.5);

void main ()
{
result(10);
}

void result(const int x, const float y)


{

cout<<"Result is: "<<x*y<<'\n';


}

(a) Compilation error (b) Result is: 105 (c) Result is: 10
(d) Result is: 30 (e) Result is: 31.5

19) If the
void result(const int x, const float y)
{
cout<<"Result is: "<<x*y<<'\n';
}
in Question 18 is changed to read as

void result(const int x, const float y)


{
x+=3;
cout<<"Result is: "<<x*y<<'\n';
}

what would be the result?

(a) Result is: 31.5 (b) Result is: 136.5 (c) Compilation error
(d) Result is: 105 (e) Result is: 30

20) Consider the following statements related to discovering object interactions in UML:

6
(i) The functionality of a use case is captured in the flow of events document.
(ii) The flow of events for a use case is captured in an interaction diagram, whereas scenarios are
captured in text.
(iii) In UML, an object in a sequence diagram is drawn as a rectangle containing the name of the
class, underlined.
(iv) During the early analysis phases, boundary classes are shown on a sequence diagram only to
capture and document the interface requirements.

Which of above statements is/are correct?

(a) Only (i) and (iii) (b) All (c) Only (i), (iii) and
(iv).
(d) Only (i) and (iv) (e) Only (i), (ii) and
(iv).

21) Consider the following incomplete statements related to object interactions in UML:
(i) ……………….are added to sequence diagrams to show the interaction with the user or
another system.
(ii) Actual messages from the ……………. to boundary class with their sequencing information
will depend on the application framework that will be selected later in development.
(iii) Draw a separate …………….. ,one for the if case, one for the then case and one for the else
case if the logic is complex and involves complicated messages.
(iv) ………….. shows object interactions organized around the objects and their links to one
another.

Identify from among the following, the correct order to fill the above blanks.

(a) Actors, Actor, Collaboration diagram, Sequence diagram


(b) Control classes, Entity class, Sequence diagram, Collaboration diagram
(c) Actors, Actor, Collaboration diagram, State diagram
(d) Boundary classes, Actor, Use case diagram, Sequence diagram
(e) Boundary classes, Actor, Sequence diagram, Collaboration diagram

22) Consider the following statements related to Classes, Packages and drawing a Class diagram:
(i) At a minimum, there must be one Boundary Class for every actor-use case interaction.
(ii) Two actors cannot use the same Boundary Class to communicate with the system.
(iii) Package diagrams help one to maintain control over a system’s overall structure
.
(iv) In Rational Rose, many Class diagrams are created in the logical view to provide the complete
picture of one’s system.

Which of the above statements is/are correct?

(a) Only (i), (ii) and (iii) (b) Only (i) and (iii) (c) Only (ii) and (iv)
(d) Only (i), (iii) and (iv) (e) All

23) Take a look at the contents in column B in relation to those in column A.

Column A Column B
(i) Message Interaction (A) represent(s) dynamic behaviour in the real world.
(ii) Object (B) allow(s) one to build easy to use and easy to
understand models of objects so that programmers can
7
easily write software.
(iii) UML (C) is an/are instance(s) of a Class.
(iv) States (D) allow(s) different forms of the same service to be
defined.
(v) Polymorphism (E) is a/are communication(s) between objects, in which
one object (the client) asks another object (the
supplier) to do something.

The following represents (a) correct matching(s) of the contents in Column A with those of Column
B.

(a) (i)-E, (ii)-C, (iii)-D, (iv)-A, (v)-B (b) (i)-B (ii)-A, (iii)-E, (iv)-C, (v)-D
(c) (i)-E, (ii)-C, (iii)-B, (iv)-A, (v)-D (d) (i)-E, (ii)-B, (iii)-C, (iv)-A, (v)-D
(e) (i)-E, (ii)-C, (iii)-B, (iv)-D, (v)-A

24) In State diagrams,

(a) the behavior inside an object is looked at.


(b) the UML notation for a state is given below.

(c) state transition represents a change from an originating state to a successor state.
(d) the UML notation for a Start state is given below.

(e) behaviour that an object displays out while it is in a particular state is called an Activity.

25) Take a look at the contents in column B in relation to those in column A.

Column A Column B
(i) Deployment (A) A diagram that emphasizes the structural organization of the
Diagram objects which send and receive messages
(B) shows the configuration of run time processing nodes and the
(ii) Activity Diagram components which live on them.
(C) A special kind of a state-chart diagram that addresses the
(iii) Sequence Diagram dynamic view of a system
(D) An Interaction diagram that emphasizes the time-ordering of
(iv) Collaboration messages
Diagram (E) addresses the static view of a system.

(v) Class Diagram

The following represents (a) correct matching(s) of the contents in Column A with those of Column
B:

(a) (i)-E, (ii)-C, (iii)-D, (iv)-A, (v)-B (b) (i)-B (ii)-A, (iii)-E, (iv)-C, (v)-D
(c) (i)-E, (ii)-C, (iii)-B, (iv)-A, (v)-D (d) (i)-B, (ii)-C, (iii)-D, (iv)-A, (v)-E
(e) (i)-B, (ii)-C, (iii)-E, (iv)-D, (v)-A

26) Consider the following program.

# include <iostream> ~Test()


using namespace std; {

8
cout << "Destructing ";
class Test delete x;
{ }
int* x; };

public: void main()


Test(int a) {
{ Test a(5);
x=new int; Test b =a;
*x=a; }
}
Identify from among the following, the correct statement(s) about the program:

(a) It causes a compilation error.


(b) It causes an assertion failure at run time.
(c) A user defined copy constructor is a must for this program.
(d) Destructor will be called twice.
(e) It compiles and executes without any errors.

27) Identify from among the following, the correct statements related to model checking in UML:

(a) It is most important to make a model homogeneous when multiple teams are working
on different parts of the model.
(b) Class name conflicts can be resolved through model walk-throughs.
(c) Classes should be split if they are cohesive.
(d) A Class may be eliminated altogether from the model if it does not participate in any
use cases.
(e) A Class may be eliminated altogether from the model if it does not have any structure
or behaviour.

28) Consider the following statements related to model checking in UML:


(i) Control classes should be deleted, if they lack any sequencing responsibility.
(ii) Consistency checking occurs during a separate phase of the analysis process.
(iii) Class represented on the class diagram should participate in at least one scenario.
(iv) Two interacting objects should have a pathway for communication via either an association
or an aggregation.
Which of the above statements is/are correct?

(a) Only (iii) and (iv) (b) Only (i), (iii) and (c) Only (i) and (iv)
(iv)
(d) Only (i) and (iii) (e) All

29) Identify from among the following, the correct statements related to designing of the system
architecture:

(a) One needs multiple models to address different concerns of a system, since no single
model is sufficient to cover all aspects of software development.
(b) Component View in Rational Rose addresses the actual software module organization
within the development environment.
(c) Logical View does not include use case realizations and interaction diagrams.
(d) The modelling elements in the implementation view of architecture are Packages
and Components along with their connections.
(e) In Process View, Component diagrams are created to view the run-time and executable

9
components created for the system.

30) Identify, from among the following, the correct descriptions.

(a) Rational Rose has the ability to take information from source code and create or
update a model.
(b) Patterns provide the capability to reuse successful designs and architectures,
which lead to more maintainable systems and increased productivity
(c) For components without a stereotype, Rational Rose will generate a .h file
containing definition and declaration information for the class.
(d) Rational Rose does not have the facility to generate Interface Design languages
(CORBA/IDL) code.
(e) During design, data types and initial values must be specified for attributes, and
operations signatures must be supplied.

31) Consider the following program:

# include <iostream> class Child : public Parent


using namespace std; {
int z;
class Parent
{ Child (int a, int b, int c) : Parent(a, b)
int x; {
int y; z=c;
}
Parent(int a, int b)
{ public:
x=a; void show()
y=b; {
} Parent::show();
cout << "z = " << z << endl;
void show()
{ }
cout << "x = " << x << endl;
cout << "y = " << y << endl; };
}
void main()
}; {
Child C(10,20,30);
C.show();
}

Which of the following is/are correct statement(s) about the above program:

(a) Object of Class child C cannot be created without first creating a Parent object in
main()
(b) The following line in class child will give a compilation error
Child (int a, int b, int c) : Parent(a, b)
(c) The Show() function in Child cannot access Show() function in class Parent
10
(d) The following line in main will give a compilation error
Child C(10,20,30);
(e) The program will output x = 10
y = 20
z = 30

32) Which of the following statements is/are true with regard to adding structure and behaviour to a
model in UML?

(a) Attributes for a class may be discovered when supplying the definition of a class.
(b) The signature of an operation may indicate a relationship.
(c) The operation of a class can be added from a sequence diagram in Rational Rose.
(d) Operation should be named in terms of the class performing the operation, and not the
class asking for the functionality.
(e) Documentation of operations can be done using Rational Rose as given below in that
order:
(i) Select the corresponding Class from the Class diagram,
(ii) Position the cursor in the documentation window and enter the
documentation for the operation.

33) The following are four programs:


(i) # include <iostream> (ii) # include <iostream>
using namespace std; using namespace std;

void testFunc(int []); void testFunc(int& []);


void main() void main()
{ {
int intArray[5]={10, 5, 7, 8 ,9}; int intArray[5]={10, 5, 7, 8 ,9};
testFunc(intArray); testFunc(intArray);
for (int i=0; i<5 ; i++) for (int i=0; i<5 ; i++)
{ {
cout << intArray[i] << " " ; cout << intArray[i] << " " ;
cout << endl; cout << endl;
} }
} }

void testFunc(int a[]) void testFunc(int& a[])


{ {
for (int i=0; i<5 ; i++) for (int i=0; i<5 ; i++)
a[i]=i*5; {
a[i]=i*5;
} }
}

(iii) # include <iostream> (iv) # include <iostream>


using namespace std; using namespace std;

int intArray[5]={10, 5, 7, 8 ,9}; void testFunc(int *ptr);


void testFunc(); void main()
void main() {
{ int intArray[5]={10, 5, 7, 8 ,9};
testFunc(); testFunc(intArray);
for (int i=0; i<5 ; i++) for (int i=0; i<5 ; i++)
{ {
11
cout << intArray[i] << " " ; cout << intArray[i] << " " ;
cout << endl; cout << endl;
} }
} }

void testFunc() void testFunc(int *ptr)


{ {
for (int i=0; i<5 ; i++) for (int i=0; i<5 ; i++, ptr++)
{ {
intArray[i]=i*5; *ptr=i*5;
} }
} }

Which of the following represents the respective outputs of the four programs?

(a) (i) 10 5 7 8 9 (ii) compilation error (iii) 10 5 7 8 9 (iv) 10 5 7 8 9


(b) (i) 0 5 10 15 20 (ii) compilation error (iii) 0 5 10 15 20 (iv) 0 5 10 15 20
(c) (i) 0 1 2 3 4 (ii) 0 1 2 3 4 (iii) compilation error (iv) 0 1 2 3 4
(d) (i) 0 5 10 15 20 (ii) 0 5 10 15 20 (iii) 10 5 7 8 9 (iv) 0 5 10 15 20
(e) (i) 0 5 10 15 20 (ii) 10 5 7 8 9 (iii) compilation error (iv) 0 5 10 15 20

34) Consider the following program segment:

class Shape void main()


{ {
public: Square S(10);
virtual double calculateArea()=0; Rectangle R(5,10);
}; Shape *basePtr = &S;
class Rectangle : public Shape cout << basePtr->calculateArea()
{ << endl;
double length;
double breadth; basePtr = &R;
public: cout << basePtr->calculateArea()
Rectangle(double a, double b) << endl;
{ }
length = a;
breadth = b;
}
};

class Square : public Shape


{
double side;
public:
Square(int a)
{
side = a;
}
double calculateArea()
{
return side*side;
}

};
12
Which of the following is/are true about the above program segment?

(a) The class Shape is an abstract class.


(b) The class Rectangle must override the calculateArea() function in class Shape in order to
instantiate a Rectangle Object .
(c) Which calculateArea() function is to be called will be resolved at runtime.
(d) The basePtr pointer cannot point to derived class objects and will cause a compilation
error.
(e) This program segment illustrates how run-time Polymorphism is achieved via Late
Binding.

35) Consider the following Activity Diagram:

Registrar Lecturer

Create SelectCourses
Syllabus

Assign lecturer to
courses

[ No ] All lecturers
ass igned?

[ Yes ]

Create
Catalogue

Place Catalogue Mail Catalogue to


in Bookstore Students

Open
Registration

Which of the following statements is/are correct regarding the above diagram?

(a) The activities Place catalogue in bookstore and Mail catalogue to students should be
done in parallel.
(b) The activity Open Registration should be done after completing the activities Place
catalogue in bookstore and Mail catalogue to students.
(c) There are two swimlanes which show the activities in the model according to

13
responsibility.
(d) The activity Open Registration should be done after completing the activity Place
catalogue in book store or Mail catalogue to students.
(e) Select courses is a manual activity.

********

14

You might also like