This program is completed in 5 steps. These steps are :-
STEP 1 :-
------Make Add package and run it------
package packadd;
public class add
{
public void add1(int a,int b)
{
int c=a+b;
System.out.println("the sum is="+c);
}
}
public class add
{
public void add1(int a,int b)
{
int c=a+b;
System.out.println("the sum is="+c);
}
}
STEP 2 :-
------Make Subtraction package and run it------
package packsub;
public class sub
{
public void sub1(int a,int b)
{
int c=a-b;
System.out.println("the subtraction is="+c);
}
}
public class sub
{
public void sub1(int a,int b)
{
int c=a-b;
System.out.println("the subtraction is="+c);
}
}
STEP 3 :-
------Make Multiplication package and run it------
package packmul;
public class mul
{
public void mul1(int a,int b)
{
int c=a*b;
System.out.println("the multiplication is="+c);
}
}
public class mul
{
public void mul1(int a,int b)
{
int c=a*b;
System.out.println("the multiplication is="+c);
}
}
STEP 4 :-
------Make Division package and run it------
package packdiv;
public class div
{
public void div1(int a,int b)
{
int c=a/b;
System.out.println("the division is="+c);
}
}
public class div
{
public void div1(int a,int b)
{
int c=a/b;
System.out.println("the division is="+c);
}
}
STEP 5 :-
------Finally make a package Calculator and import all
packages and store all packages in same directory and run it------
package packcal;
import packadd.add;
import packsub.sub;
import packmul.mul;
import packdiv.div;
public class calculator
{
public static void main(String...ghj)
{
add a= new add();
a.add1(5,4);
sub b= new sub();
b.sub1(5,4);
mul m=new mul();
m.mul1(4,5);
div d= new div();
d.div1(5,4);
}
}
import packadd.add;
import packsub.sub;
import packmul.mul;
import packdiv.div;
public class calculator
{
public static void main(String...ghj)
{
add a= new add();
a.add1(5,4);
sub b= new sub();
b.sub1(5,4);
mul m=new mul();
m.mul1(4,5);
div d= new div();
d.div1(5,4);
}
}
Awesome work Guys, So here is a best converter which will definitely convert several files;
ReplyDeleteFile Free Converter
That surely help you to convert various files like these;
ReplyDelete3gpp to mp3
Mov to Gif
Ts to mp4
Mxf to Mp4
Mp4 to android
Shock
ReplyDeleteRespect and that i have a swell give: What Is House Renovation house renovation price
ReplyDelete