IT3101 - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

IT3101

Description:

(a) It will give a compilation error. (b) Frisky is a cat who is 0 years old. ... (b) It will give compilations errors since the main() function doesn't have any ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 36
Provided by: institutet1
Category:

less

Transcript and Presenter's Notes

Title: IT3101


1
  • IT3101
  • Object Oriented Systems Development

2
Examination Procedure
  • Examination Paper will consist of two parts.
  • Part 1 1 ½ Hour paper consisting of Multiple
    Choice Questions
  • Part 2 1 ½ Hour Paper consisting of Structured
    Questions

3
Examination Procedure cont..
  • Students will be given two Case Studies during
    the semester.
  • There will be structured questions based on one
    of the Case Studies.

4
IT3101 Model Question paper
  • Already published on the web.
  • see www.bit.lk or
  • www.ict.cmb.ac.lk/bit.htm
  • You will receive the model question paper
    including a model Case study before the
    examination.
  • Other Case studies will also be send to you
    before the examination.

5
Model Questions
  • Model Paper Q (34)

6
Which of these statements are correct according
to the given use case diagram
  • (A) The trader and the sales person always play
    the same role in the system.
  • (B) Both AnalyzeRisk and PrizeDeal are required
    to value the deal.
  • (C) There may be customers with exceeded limits.
  •  

7
(A) The trader and the sales person always play
the same role in the system.
FALSE
8
(B) Both AnalyzeRisk and PrizeDeal are
required to value the deal.
TRUE
9
(C) There may be customers with exceeded limits.
TRUE
10
  • The trader and the sales person always play the
    same role in the system. False
  • (B) Both AnalyzeRisk and PrizeDeal are required
    to value the deal. True
  • (C) There may be customers with exceeded
    limits. True
  • (a) All are correct.
  • (b)  A and B are correct.
  • (c)   A and C are correct.
  • (d)  B and C are correct
  • (e)   All are incorrect.
  • Answer (d)

11
Q (23) Match the statements in column B with
column A.
  • Column A
  • (i) State
  • (ii)Behaviour
  • (iii) Identity
  • (iv)Class
  • (v) Message
  • passing
  • Column B
  • (A) Objects communicate with each other
  • (B) Implemented by the set of operations for
    the object
  • (C) Defined by the attributes and the
  • relationships an object has with other
  • objects.
  • (D) Group of objects with common properties,
    common behaviour and
  • common relationships to other objects.
  • (E) Each object is unique.

12
Q (25)
  • Which of the following is the best description of
    the sequence diagram given above?
  • When an instance of a
  • (a) Person is asked for its assets, it sums the
    balances of each of its asset accounts.

13
Q (25)
  • Which of the following is the best description of
    the sequence diagram given above?
  • When an instance of a
  • (b) Customer is asked for its assets, it sums the
    balance of each of its asset Accounts.

14
Q (25)
  • Which of the following is the best description of
    the sequence diagram given above?
  • When an instance of a
  • (c) Person is asked for its assets, it returns
    the balance of its asset account.

15
Q (25)
  • Which of the following is the best description of
    the sequence diagram given above?
  • When an instance of a
  • (d) Customer is asked for its assets, it returns
    the balance of its asset account.

16
Q (25)
  • Which of the following is the best description of
    the sequence diagram given above?
  • When an instance of a
  • (e) Person or Customer is asked for its
    assets, it sums the balance of each of its asset
    Accounts.

(a) Best description
17
Q (18) Which of the following statement(s)
about C variables is (are) correct?
  • (i) C variables are case sensitive and must
    begin with a letter.
  • (ii) new is a valid variable.
  • (iii) a1 and _byte are valid variables.
  • (iv) C keywords cannot be used as variable
    names.

Wrong
Wrong
Wrong
Correct
18
Q 28) Consider the following
program. include ltiostream.hgt  class cat int
itsAge, itsWeight public void
Meow()coutltlt"Meow" cat()coutltlt"Initialised
cat\n"itsAge0 cat()coutltlt"Destroy
cat\n" int getAge()return itsAge

19
void main() cat frisky coutltlt"Frisky is a
cat who is " coutltltfrisky.getAge() coutltlt"
Years old.\n"  Which of of the following would
the output of the program be?
Display
Initialised Cat
cat()
Frisky is a cat who is
0
Years old.
Destroy cat
cat()
20
(a)    It will give a compilation error. (b)   
Frisky is a cat who is 0 years old. (c)   
Initialised cat Frisky is a cat who is 0
years old. Destroy cat (d)    Initialised
cat Frisky is cat who is 0 years
old. (e)    None of the above.
Answer (c)
21
Q 27) Consider the following program.   void main
() int i0 do
coutltlt"Loop"ltlti i break
while(igt100) Identify, from
among the following, the correct
descriptions. (a)    The loop is of the
non-terminating type.
Wrong
22
Q 27) Consider the following program.   void main
() int i0 do
coutltlt"Loop"ltlti i break
while(igt100) Identify, from
among the following, the correct
descriptions. (b)    When executed the first line
that displays is Loop0
Correct
23
Q 27) Consider the following program.  void main
() int i0 do
coutltlt"Loop"ltlti i break
while(igt100) Identify, from
among the following, the correct descriptions.
(c) If break is replaced with continue the loop
will never be terminated.
Wrong
24
Q 27) Consider the following program.  void main
() int i0 do
coutltlt"Loop"ltlti i break
while(igt100) Identify, from
among the following, the correct descriptions.
(d) When executed the last line that displays is
Loop99
Wrong
25
Q 27) Consider the following program.  void main
() int i0 do
coutltlt"Loop"ltlti i break
while(igt100) Identify, from
among the following, the correct descriptions.
(e)    The loop body will be repeated 100 times.
Wrong
26
Q 26) Declaration of a new type called Cat is
illustrated below, class Cat int
itsAge int itsWeight void main()
What would happened when
compiling this program segment ? (a) It will
execute and the default message on the console
will appear.
Wrong
27
Q 26) Declaration of a new type called Cat is
illustrated below, class Cat int
itsAge int itsWeight void main()
What would happened when
compiling this program segment ? (b)  It
will give compilations errors since the main()
function doesnt have any programming codes
to execute.
Wrong
28
Q 26) Declaration of a new type called Cat is
illustrated below, class Cat int
itsAge int itsWeight void main()
What would happened when
compiling this program segment ? (c)    It will
give an error saying, Cat followed by void'
is illegal, is missing.
Correct
29
Q 26) Declaration of a new type called Cat is
illustrated below, class Cat int
itsAge int itsWeight void main()
What would happened when
compiling this program segment ? (d)    It will
execute and no message is displayed.
Wrong
30
Q 26) Declaration of a new type called Cat is
illustrated below, class Cat int
itsAge int itsWeight void main()
What would happened when
compiling this program segment ? (e)    It will
give an error saying missing storage class or
type specifiers.
Wrong
31
Q 21) Which of the following is/are correct
regarding C?   (a)  Destructor takes the same
name as the class preceded by the tilde
character () (b)  Destructors cannot
take arguments. (c)   There is only one
destructor function for a class (d)   Destructor
function is called whenever the object
created using the constructor expires. (e)   One
can overload a destructor  
Correct
Correct
Correct
Correct
Wrong
32
IT 3101 Structured Question Paper
  • There will be 4 questions.
  • Duration 1 ½ hours
  • First question is based on one of the case
    studies given. This is a compulsory question.
  • You need to answer two out of the other three
    questions

33
Q2.(b) What would be the output of the following
program? include ltiostream.hgt class A public
A() coutltltIn Constructor A\n
A()coutltltIn Destructor A ) class B
public B()coutltltIn Constructor B \n
B()coutltltIn Destructor B  class C
public A, public B public C() coutltltIn
Constructor C\n C()coutltltIn Destructor C
 
34
  • void main()
  • C ob

35
  • OUPUT
  • In Constructor A
  • In Constructor B
  • In Constructor C
  • In Destructor C In Destructor B
  • In
    Destructor A
Write a Comment
User Comments (0)
About PowerShow.com