New Member FAQ
|
Forums
|
Earn Revenue
|
Posting Guidelines
|
Help Topics
|
Admissions 2013
Awards & Gifts
Login
Register
Articles
Practice Tests
Ask Experts
Question Papers
Jobs
Universities
Colleges
Courses
Schools
Training
Gift Shop
|
Bookmarks
|
Reviews
|
Learn English
|
Social Hub
|
New Posts
|
My India
|
Members
|
Polls
|
Active Members
Today
T Gar
(255)
Ankita patel
(150)
Chetan Markand...
(145)
Last 7 Days
R Pramod
(932)
K Mohan
(733)
yash
(702)
more...
Join our online
Google+ community
for Bloggers, Content Writers and Webmasters
Java program to create an abstract class
Posted Date: Total Responses:
0
Posted By:
Sunil Reddy
Member Level:
Platinum
Points/Cash
: 2
import java.lang.*;
abstract class Shape
{
abstract void numberOfSides();
}
class Traingle extends Shape
{
public void numberOfSides()
{
System.out.println("three");
}
}
class Trapezoid extends Shape
{
public void numberOfSides()
{
System.out.println("four");
}
}
class Hexagon extends Shape
{
public void numberOfSides()
{
System.out.println("six");
}
}
public class Sides
{
public static void main(String arg[])
{
Traingle T=new Traingle();
Trapezoid Ta=new Trapezoid();
Hexagon H=new Hexagon();
T.numberOfSides();
Ta.numberOfSides();
H.numberOfSides();
Project Feedbacks
No feedbacks found. Be the first to respond...
Post Feedback
You must
Sign In
to post a feedback.
Next Project:
Java program that allows the user to draw lines,rectangles and ovals
Previous Project:
C program, using pointer for string comparison
Return to Project Index
Post New Project
Related Projects
Java program that creates a user interface to perform integer divisions
FontLister
Java program for handling mouse events
Java program that works as a simple calculator
Develope an applet that displays a simple message
Subscribe to Email
Get Jobs by Email
Forum posts by Email
Articles by Email
Online Members
ratna
Venkiteswaran.
stylus
alex thomas
saurabh
Alice
skde
Suman Sinha
Ramprasad
More...
About Us
Contact Us
Copyright
Privacy Policy
Terms Of Use
AdSense Revenue Sharing sites
Advertise
Talk to
Tony John
ISC Technologies, Kochi - India. Copyright © All Rights Reserved.