Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Solve the following programs of java (http://www.go4expert.com/forums/solve-following-programs-java-t22432/)

anchal 16Jun2010 11:25

Solve the following programs of java
 
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.

shabbir 16Jun2010 11:33

Re: Solve the following programs of java
 
You want us to write those programs for you or what?

anchal 17Jun2010 09:46

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.....

reena 6Feb2011 12:18

Re: Solve the following programs of java
 
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.

virxen 7Feb2011 02:35

Re: Solve the following programs of java
 
1)----->http://www.javacoffeebreak.com/java101/myfirstprog.java
2)----->http://www.dickbaldwin.com/java/Java032.htm
3)----->http://www.coderanch.com/t/505822/ja...simple-counter
4)----->http://www.javaworld.com/jw-10-2000/...structors.html

for the rest use google




check and this
http://www.javabeginner.com/learn-ja...a-constructors

lionaneesh 7Feb2011 09:47

Re: Solve the following programs of java
 
Quote:

Originally Posted by reena (Post 78856)
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.

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...


All times are GMT +5.5. The time now is 20:57.