BIT 1310  BBIT 1310  OBJECT ORIENTED TECHNLOGIES.

UNIVERSITY EXAMINATIONS: 2020/2021
EXAMINATION FOR DEGREE IN BACHELOR OF SCIENCE/
BUSINESS INFORMATIONTECHNOLOGY
BIT 1310/BBIT 1310: OBJECT ORIENTED TECHNLOGIES
PART TIME/FULL TIME/DISTANCE LEARNING
ORDINARY EXAMINATIONS
DATE: DECEMBER, 2021 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE COMPULSORY and Any Other TWO Questions

QUESTION ONE [20 MARKS]
A local Bank intends to implement Automatic Teller Machine (ATM) system. The ATM is
supposed to offers the following services:
1) Distribute money to every holder of a smartcard via a card reader and a cash dispenser.
2) Account balance, cash and cheque deposit facilities for bank customers who hold a smartcard
from the bank.
3) All transactions are to be secured.
4) It is sometimes necessary to refill the dispenser, etc.
Required:
a) Identify and draw the actors (use well labeled diagram representation of actors) [5 Marks]
b) Construct a use case diagram [5 Marks]
c) Write a textual description of the use cases [5 Marks]
d) Organize and structure the use cases [5 Marks]
QUESTION TWO [15 MARKS]
Design a billing application system for Nairobi Sewer and Water Management Company. The
system should be able to authenticate a user via password and user name, and blocks the user
after three failed attempts. On login, the user is given three options, namely;
0: To check his/her current bill,
1: To make payment, and
2: To key in the current and previous meter readings.
The current meter readings must be greater than previous readings. The system must go on to
calculate the units consumed using the formula (previous reading- current reading). The cost for
a unit of consumption is KES 5.50. There is also a fixed charge of KES 300.00 and VAT of 5%
of the total cost of the consumption.
Required:
Write C++ codes for the above [15 Marks]
QUESTION THREE [15 MARKS]
a) Write any simple program in C++ to demonstrate inheritance [5 Marks]
b) Study the C++ code lines below and answer the questions that follow:
1. #include <iostream>
2. #include <string>
3. using namespace std;
4. template <typename T>
5. inline T const& Max (T const& a, T const& b) {
6. return a < b ? b:a;
7. }
8. int main () {
9. int i = 39;
10. int j = 20;
11. cout << “Max(i, j): ” << Max(i, j) << endl;
12. double f1 = 13.5;
13. double f2 = 20.7;
14. cout << “Max(f1, f2): ” << Max(f1, f2) << endl;
15. string s1 = “Hello”;
16. string s2 = “World”;
17. cout << “Max(s1, s2): ” << Max(s1, s2) << endl;
18. return 0;
19. }
Required:
c) Give a brief account of the functionality of the following lines of code (as presented in the
code above)
i. 3 [1 Mark]
ii. 4 [1 Mark]
iii. 5 [1 Mark]
iv. 8 [1 Mark]
iv. 10 [1 Mark]
v. 11 [1 Mark]
d) Write C++ codes to demonstrate proper application of the following. Further, give a brief
explanation for the same.
i. void main(), and [4 Marks]
QUESTION FOUR [15 MARKS]
a) Write a C++ function using a function called “area”, called in the method main to calculate the
area of a circle whose radius is 4cm and display the area on the console screen [5 Marks]
b) Briefly discuss the functional and non-functional requirements during requirements modelling
[6 Marks]
c) With the help of examples, differentiate between “Object Oriented Analysis” and “Object Oriented
Design” [4 Marks]

(Visited 187 times, 1 visits today)
Share this:

Written by