0% found this document useful (0 votes)
46 views5 pages

Program 1: Interface1 Interface X (Abstract Add and Sub)

The document describes 6 programs that demonstrate inheritance and implementation of interfaces in Java. Each program defines 1-3 interfaces that abstract certain methods like add, sub, mul, and div. Classes then implement the interfaces, inheriting the abstract methods, and concrete classes extend the abstract classes to provide implementations of the abstracted methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views5 pages

Program 1: Interface1 Interface X (Abstract Add and Sub)

The document describes 6 programs that demonstrate inheritance and implementation of interfaces in Java. Each program defines 1-3 interfaces that abstract certain methods like add, sub, mul, and div. Classes then implement the interfaces, inheriting the abstract methods, and concrete classes extend the abstract classes to provide implementations of the abstracted methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Program 1: Interface1

Interface X
(Abstract add and sub)


Class A Implements X
(Implements add and sub)

Program 2: Interface2
Interface Y
(Abstract mull)


Interface X Extends Y
(Abstract add and sub)


Class A Implements X
(Implements add, sub and mull)

Program 3: Interface3
Interface Y
(Abstract mull)



Interface X Extends Y
(Abstract add and sub)



Abstract Class A Implements X
(Implements add and sub)



Class B Extends A
(Implements mull)


Program 4: Interface4

Interface Y Interface X
(Abstract mull) (Abstract add and sub)





Abstract Class A Implements X,Y
(Implements add and sub)



Class B Extends A
(Implements mull)




Program 5: Interface5
Interface Y Interface Z
(Abstract mull) (Abstract div)


Class C Interface X Extends Z
(div) (Abstract add and sub)





Abstract Class A Extends C Implements X,Y
(Implements add and sub)



Class B Extends A
(Implements mull)

Program 6: Interface6
Interface Y Interface Z
(Abstract mull) (Abstract div)


Class C Interface X Extends Y and Z
(div) (Abstract add and sub)





Abstract Class A Extends C Implements X
(Implements add and sub)



Class B Extends A
(Implements mull)

You might also like