Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  India NewsIndia News  
Keywords
2010 CLASS 2006 papers physics YEAR question RESULT prelim
Latest topics
Top posters
abhas
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
Anu..i luv icse...:)
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
G-7
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
siya
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
Candy
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
jOhNy
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
Apurva
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
WinRrule
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
ambili
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 
saif
ISC XII JAVA Inheritance program to find circles area Vote_lcapISC XII JAVA Inheritance program to find circles area Voting_barISC XII JAVA Inheritance program to find circles area Vote_rcap 



Search if you can't find it here

ISC XII JAVA Inheritance program to find circles area

View previous topic View next topic Go down
AuthorMessage
abhas
Active member
Active member
abhas


ISC XII JAVA Inheritance program to find circles area Vide
PostSubject: ISC XII JAVA Inheritance program to find circles area ISC XII JAVA Inheritance program to find circles area EmptyWed Nov 25, 2009 8:00 pm

circle.java

Code:
import java.io.*;
class circle extends point
{
    private double area,radius;
    public void callength()
    {
        Double a,b,c;
        a=Math.pow(x1-x2,2);
        b=Math.pow(y1-y2,2);
        c=a+b;
        radius= Math.pow(c,.5);
       
    }     
    public void cal_area()
    {
        area=(22/7)*radius*radius;
    }
    public void print()
    {
        System.out.println(radius);
        System.out.println(area);
        System.out.println(x1+";"+y1);
        System.out.println(x2+";"+y2);
        }
    circle()throws IOException
    {super.accept();}
}
 

point.java
Code:
import java.io.*;
class point
{
    protected double x1,x2,y1,y2;
    point()
    {
        x1=0;
        x2=0;
        y1=0;
        y2=0;
        }
    public void accept()throws IOException
    {
          BufferedReader inv= new BufferedReader(new InputStreamReader(System.in));
          System.out.println("Enter values");
          x1=Double.parseDouble(inv.readLine());
          x2=Double.parseDouble(inv.readLine());
          y1=Double.parseDouble(inv.readLine());
          y2=Double.parseDouble(inv.readLine());
        }
    }
 
         

Mncir.java
Code:
import java.io.*;
class Mncir
{
public static void main(String args[])throws IOException
{
circle s=new circle();
s.callength();
s.cal_area();
s.print();
}
}
Back to top Go down
View user profile

ISC XII JAVA Inheritance program to find circles area

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: ISC :: ISC 2010 [Class xii] :: Computer-