2081 4

BIT301 ยท 2081 ยท 5 marks

How is class different from interface? Illustrate with an example.

How is class different from interface? Illustrate with an example. [5]

Web Technology IIChapter 6: Object Oriented ProgrammingInterfaces and class differences

A class is a complete blueprint: it declares what an object holds and supplies the bodies of the methods that act on it. An interface is only a contract: it names the methods an implementing class must provide, without saying how any of them work. A class answers how, an interface answers what. P...