Tutor profile: Sphelele Nkosinathi Xolani Z.
Subject: Java Programming
What is the difference between an interface and an abstract class?
Interfaces are 100% abstract because all its methods are abstract. A method is abstract if it does not have an implementation. Interface methods are implicitly abstract and public (no need for the keywords 'public and 'abstract') and all its variables are constants (i.e 'static final') implicitly. Since Java does not allow classes to extend two or more other classes, interfaces are used to achieve this. Abstract classes are marked using the keyword 'abstract' and they cannot be instantiated. If any class has a method marked as 'abstract' then the class has to be marked 'abstract' as well and abstract classes can have other methods that are not abstract and variables that are not constants. Any class that extends an abstract class or implements an interface has to provide an implementation for all the abstract methods or declare them abstract again.
Subject: iOS Programming
Differentiate between a static cell and a dynamic prototype cell of a UITableView.
A static cell is a cell that displays the same information, usually hard-coded, whenever the UITableView is loaded. For example, the settings app of the iPhone uses a lot of static cells in its UITableView to present information that shorter and doesn't change all the time. A prototype cell displays information that is dynamically loaded using the UITableViewDataSource. One cell is designed and will be re-used by all rows of the UITableView. An example of this is the contact list in the iPhone which is longer and can change when you add or remove a contact and when you scroll up and down the prototype cell is re-used to give the rows the same look and feel.
Subject: C Sharp Programming
Describe the use of the "sealed" keyword.
the keyword "sealed " when used with classes means the class cannot be subclassed or inherited or extended. Built-in classes like the string class use this keyword, that is why it is not possible to subclass them. When used with a method it means that method cannot be overridden.
needs and Sphelele Nkosinathi Xolani will reply soon.