Solve the following programs of java

Discussion in 'Java' started by anchal, Jun 16, 2010.

  1. anchal

    anchal New Member

    Joined:
    Jun 16, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    List of JAVA Programme


    1. Create a “Hello, World” program that simply prints out that statement.
    2. Write a program that prints three arguments taken from the command line.
    3. Write a program that prints values from 1 to 100.
    4. Create a class with a default constructor (one that takes no arguments) that prints a message. Create an object of this class.
    5. Write Java assignment statements to evaluate the following equations:
    (i) Energy = mass(acceleration*height+(velocity)sqr(2)/2)
    (ii) Torque = 2m1m2/m1+m2 * g
    6. Design and write a Java program to define a class called Rectangle that contains members for representing its length and breadth. Provide members to get and set these attributes.
    7. Design a class to represent a bank account. Include the following members:
    Data members:
    Name of the depositor
    Account number
    Type of account
    Balance amount in the account
    Methods:
    To assign initial values
    To deposit an amount
    To withdraw an amount after checking balance
    To display the name and balance
    8. Write simple program to calculate the sum of digits of any number.
    9. Write a simple program to display a “*” I triangle shape.
    Output will be like this
    *
    * * *
    * * * * *
    10. Write a simple program to call a method called simple from a main function. The method simple should accept an integer as an argument and calculate the square of the number in the method simple.
    11. Write a Java program to add two integers and two float numbers. When no arguments are supplied, give a default value to calculate the sum. Use method overloading to achieve this.
    12. Write a program to perform mathematical operations. Create a class called AddSub with methods to add and subtract. Create another class called MultDiv that extends from AddSub class to use the member data of the superclass. MultDiv should have methods to multiply and divide. A main method should access the method and perform the mathematical operations.
    13. Write an interface with a method called display. Implement this method I a class to display two names.
    14. Write an interface that has two methods called push and pop of a stack. Write a class to implement the two methods for a fixed size stack creation.
    15. Write a small program to catch NegativeArraySizeException. This exception is caused when the array is initialized to negative values.
    16. Write a program to handle NullPointerException and use the finally clause to display a message to the user.
    17. Write a Java program that takes a string and converts it into uppercase and lowercase letters.
    18. Write a Java program to find the volume of a sphere and a cone.
    19. Write a Java program to convert rupees to dollars.
    20. Write a Java program to find x to the power y. Use overloading for different cases when x and y are combinations of integer and floating point numbers.
    21. Create an abstract class called Figure that has an abstract method called draw (). Make the subclasses called Filled_Rectangle, Filled_Arc and override the draw method in which you would print the message regarding the current object.
    22. Write a Java program that has integer variables a, b, c and result as float. Store some values in them and apply the formula result = a/(b-c). Catch the probable exception.

    23. Write a Java program that accepts two strings as command line arguments. It checks for the number of command line arguments. If they are less or more it throws an exception giving an appropriate message.
    24. Write applets to draw the following shapes:
    (i) Cone
    (ii) Cylinder
    (iii) Cube
    (iv) Square inside a circle
    (v) Circle inside a square
    25. Write an applet to display the following figure:
    26. Write an applet to display a face.
    27. Write an applet to display five buttons.
    28. Write an applet to illustrate BorderLayout.
    29. Write a Java program to create 5 threads by extending Thread class.
    30. Write a Java program to create 5 threads by implementing Runnable interface.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You want us to write those programs for you or what?
     
  3. anchal

    anchal New Member

    Joined:
    Jun 16, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    pls. solve it and mail me

    i want u to solve the java questions posted to u....
    using core java....
    pls.solve them and mail me.....
     
  4. reena

    reena New Member

    Joined:
    Feb 6, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Design and write a Java program to define a class called Rectangle that contains members for representing its length and breadth. Provide members to get and set these attributes.
     
  5. virxen

    virxen Active Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    28
  6. lionaneesh

    lionaneesh Active Member

    Joined:
    Mar 21, 2010
    Messages:
    848
    Likes Received:
    224
    Trophy Points:
    43
    Occupation:
    Student
    Location:
    India
    Actually , If you want experts to really help you then you have to provide your own code...We can fix code for you but not write code from scratch...

    Sorry , But its the truth...
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice