{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

BTC 2101 – Object Oriented Programming - July 2015.pdf

BTC 2101 – Object Oriented Programming - July 2015.pdf -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
FACULTY OF INFORMATION TECHNOLOGY BACHELOR OF TELECOMMUNICATIONS Final Examination BTC 2101 Object Oriented Programming DATE : 17 th , July 2015 TIME: 2 Hours Instructions: Answer Question One and Any other two questions Question 1 20 marks a) Explain the following object oriented concepts. Use examples where necessary: (5 marks) i Object ii Class iii Constructor iv Inheritance v Polymorphism b) Give the complete command necessary to compile the file in which the class FloorLamp is implemented. (2 marks) c) State whether or not each of the following declarations is legal in JAVA ? Justify your answer in each case. (4 marks) i public MyClass {//...} ii public protected int myVar; iii friendly Button myButton; iv Label myLabel d) What does it mean for a member of a class to be static? (2 marks) e) Supposing you were the lead consultant hired by Strathmore bank to redesign their ATM Application; Using java as your programming language and OOP as your programming paradigm, Design an Account Class which has a balance attribute and three methods: i) Deposit that adds some amount to the account; ii) Withdraw that deducts some amount from the account if the account has enough; iii) Get Balance that checks the amount remaining in the account. (5 marks) f) What kind of class cannot be instantiated as an object? Why? (2 marks) Question 2 (20 marks) a)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}