KEMBAR78
Abstraction Task | PDF | Computers
0% found this document useful (0 votes)
238 views2 pages

Abstraction Task

This document discusses abstraction and interfaces in Java. It begins with a brief introduction to abstraction and interfaces. It then lists 7 questions about abstraction theory, including the differences between abstract classes and interfaces, abstract methods, and achieving multiple inheritance in Java. The remainder of the document contains 6 programming questions involving abstract classes and interfaces to practice these concepts. The questions involve overriding abstract methods in subclasses and implementing interfaces.

Uploaded by

kavya g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
238 views2 pages

Abstraction Task

This document discusses abstraction and interfaces in Java. It begins with a brief introduction to abstraction and interfaces. It then lists 7 questions about abstraction theory, including the differences between abstract classes and interfaces, abstract methods, and achieving multiple inheritance in Java. The remainder of the document contains 6 programming questions involving abstract classes and interfaces to practice these concepts. The questions involve overriding abstract methods in subclasses and implementing interfaces.

Uploaded by

kavya g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Day7_Abstraction

DAY7:
---------

1.Abstraction
2.Interface

QUESTIONS(Theory)
---------------------
1.What is mean by Abstraction?
2.Difference between Abstract class and interface?
3.What is mean by abstract method?
4.Can we create object for abstract class?
5.In interface,can we make method as static?
6.In interface,can we make method as final?
7.How will achieve multiple inheritance in java,write a code for that?

QUESTIONS(Programs)
--------------------
QUESTION 1:
------------
Find the answer for below questions and tell whether it is possible or
not?
I implements I
I implements C
I implements A
I extends I
I extends C
I extends A

C implements I
C implements C
C implements A
C extends I
C extends C
C extends A

A implements I
A implements C
A implements A
A extends I
A extends C
A extends A

A-abstract class
C-class
I- interface

QUESTION 2:
------------
Project :BankDetails
Package :org.bank
Class :BankInfo
Methods :saving(),fixed(),deposit()

AbstractClass :AxisBank
Methods :deposit()

Description:
You have to override the method deposit in AxisBank.

QUESTION 3:
------------
Project :EducationInformation
Package :org.edu
AbstractClass :Education
Methods :ug(),pg()

Class :Arts
Methods :bSc(),bEd(),bA(),bBA(),ug(),pg()

Description:
You have to override the method ug(),pg() in Arts.

QUESTION 4:
------------
Project :UniversityInformation
Package :org.univ
Abstract Class :University
Methods :ug(),pg()

Class :College
Methods :ug(),pg()

Description:
ug(),pg() is just a templete in University class and You have to override
the method ug(),pg() in College class.

QUESTION 5:
------------
Project :BikeInformation
Package :org.bike
Interface :Bike
Methods :cost(),speed()

Class :Ktm
Methods :cost(),speed()

Description:
cost(),speed() is just a templete in Bike Interface and You have to
override the method cost(),speed() in Ktm class.

QUESTION 6:
-------------
Project :Computer
Interface :HardWare
Methods :hardwareResources()

Interface :Software
Methods :softwareResources()

Class :Desktop
Methods :desktopModel()

Description:
create 2 Interface and archieve multiple inheritance.

You might also like