You are Unregistered, please register to gain Full access.    
Sedo - Buy and Sell Domain Names and Websites project info: warez-max.com Statistics for project warez-max.com etracker® web controlling instead of log file analysis  

Go Back   Warez-Max ::> Source Of All New Downloads > General > Programming


Programming All about programming,tuturials, discuss...
Thread Description:noob program

Register Now for FREE!
Our records show you have not yet registered to our forums. To sign up for your FREE account INSTANTLY fill out the form below!

Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
Agree to forum rules 

Reply
Submit Thread >  Submit to AddThisTo Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Google Submit to Yahoo! This Submit to Technorati Submit to StumbleUpon Submit to Spurl  < Submit Thread
 
LinkBack Thread Tools Display Modes
Old 02-13-2010, 09:41 AM   #1 (permalink)
Moderator
 
Linux Master's Avatar
 
Join Date: Sep 2009
Posts: 303
Thanks: 0
Thanked 89 Times in 61 Posts
Linux Master is on a distinguished road
Smile my java program

this is my first work in java programming its kinda noob. nyahha


Quote:
import javax.swing.*;

public class Aricthmetic{
public void choose_Operator (int Opt){
switch (Opt){
case 1:
JOptionPane.showMessageDialog(null, "you choose 1 which is the addition press ok to continue");
int add1,add2,sum;
add1=Integer.parseInt(JOptionPane.showInputDialog( "input number to be added:"));
add2=Integer.parseInt(JOptionPane.showInputDialog( "input number to be added:"));
sum=add1+add2;
JOptionPane.showMessageDialog(null,sum+" is the sum");
break;
case 2:
JOptionPane.showMessageDialog(null, "you choose 2 which is the subtration press ok to continue");
int sub1,sub2,subtration;
sub1=Integer.parseInt(JOptionPane.showInputDialog( "input number to be subtrated:"));
sub2=Integer.parseInt(JOptionPane.showInputDialog( "input number to be subtrated:"));
subtration=sub1-sub2;
JOptionPane.showMessageDialog(null,subtration+" is the different");
break;
case 3:
JOptionPane.showMessageDialog(null, "you choose 3 which is the multiplication press ok to continue");
int mul1,mul2,Multiplication;
mul1=Integer.parseInt(JOptionPane.showInputDialog( "input number to be multiple:"));
mul2=Integer.parseInt(JOptionPane.showInputDialog( "input number to be multiple:"));
Multiplication=mul1*mul2;
JOptionPane.showMessageDialog(null,Multiplication+ " is the product");
break;
case 4:
JOptionPane.showMessageDialog(null, "you choose 4 which is the division press ok to continue");
int div1,div2,divide;
div1=Integer.parseInt(JOptionPane.showInputDialog( "input number to be divided:"));
div2=Integer.parseInt(JOptionPane.showInputDialog( "input number to be divided:"));

if (div2==0){JOptionPane.showMessageDialog(null , "you cant input zero value");
}
else{
divide=div1/div2;
JOptionPane.showMessageDialog(null,divide+" is the quotient");
break;
}


default:
JOptionPane.showMessageDialog(null,"you choose nothing press ok to exit");
}
}
public static void main(String args[]){
Aricthmetic obj = new Aricthmetic();


boolean continuex=true;
while (continuex){
int x = Integer.parseInt(JOptionPane.showInputDialog("ninz calculator version 1.0.4\n \n1.ADDITION\n 2.SUBTRACTION\n 3.MULTIPLICATION\n 4.DIVISION\n CHOOSE OPERATOR:"));
obj.choose_Operator(x);
int cont= JOptionPane.showConfirmDialog(null,"do you to have another transaction?");
if (cont!=0){
continuex=false;

}

}
}
}
__________________
Linux Master is offline   Reply With Quote
Old 03-11-2010, 06:31 AM   #2 (permalink)
Warez-Max toddler
 
Join Date: Mar 2010
Posts: 15
Thanks: 0
Thanked 2 Times in 2 Posts
a_ykutt is on a distinguished road
Default

thank you very much
a_ykutt is offline   Reply With Quote
Old 03-30-2010, 07:36 PM   #3 (permalink)
Warez-Max toddler
 
Join Date: Mar 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
ainaisffxi is on a distinguished road
Default

is some code java long?
ainaisffxi is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:00 PM.

Download Rapidshare PhazeDDL Warez
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
© 2010 Warez-Max.com, All rights reserved.

LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks