BTC 2101 – Object Oriented Programming - July 2015.pdf

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

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

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)
Image of page 1

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

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '16

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern