anyone can help me..
i have a task to coplete
below is the question :

create class called Arithmetic for performing arithmetic process.
use two integer variables to represent the private data of the class. provide a constructor function that enables an object of this class to be initialized when it is declared. the constructor should contain default values in case no initializers are provided.

provide public member functions for each of the following :

a) accepting values for Arithmetic variables
b) menu for Arithmetic process option.
c) addition of two numbers. this function should return a value
d) substraction of two numbers. this function should return a value
e) multiplication of two numbers. this function should return a value
f) division of two numbers. this function should return a value
g) printing Arithmetic numbers. this function should return a value

anyone can help me..
i have a task to coplete
below is the question :

create class called Arithmetic for performing arithmetic process.
use two integer variables to represent the private data of the class. provide a constructor function that enables an object of this class to be initialized when it is declared. the constructor should contain default values in case no initializers are provided.

provide public member functions for each of the following :

a) accepting values for Arithmetic variables
b) menu for Arithmetic process option.
c) addition of two numbers. this function should return a value
d) substraction of two numbers. this function should return a value
e) multiplication of two numbers. this function should return a value
f) division of two numbers. this function should return a value
g) printing Arithmetic numbers. this function should return a value

And what part of this do you not understand, or are you having a specific problem with?

We are not just simply going to do your assignment for you.

public class arithmetic
{
private int x;
private int y;
public arithmetic(int i,int w) // default constructor
{
x = i;
y = w;
}
{
return x + y;
}
public int substraction() // method
{
return x - y;
}
public int multiplication() // method
{
return x * y;
}
public int division() // method
{
return x / y;
}
public static void main(String[] args)
{

{
int arithmetic=4;
switch (arithmetic)
{
case 2: arithmetic sub=new arithmetic(5,2);
System.out.println("Substraction of two number is:"+sub.substraction());
case 3:arithmetic multiply=new arithmetic(5,2);
System.out.println("Multiplication of two number is:"+multiply.multiplication());
case 4: arithmetic divide=new arithmetic(5,2);
System.out.println("Division of two number is:"+divide.division());
}
}
}
}

this is code that i write..but i don't know how to display a menu in question a.that'a all

``````public class arithmetic
{
private int x;
private int y;
public arithmetic(int i,int w) // default constructor
{
x = i;
y = w;
}
{
return x + y;
}
public int substraction() // method
{
return x - y;
}
public int multiplication() // method
{
return x * y;
}
public int division() // method
{
return x / y;
}
public static void main(String[] args)
{

{
int arithmetic=4;
switch (arithmetic)
{
case 2: arithmetic sub=new arithmetic(5,2);
System.out.println("Substraction of two number is:"+sub.substraction());
case 3:arithmetic multiply=new arithmetic(5,2);
System.out.println("Multiplication of two number is:"+multiply.multiplication());
case 4: arithmetic divide=new arithmetic(5,2);
System.out.println("Division of two number is:"+divide.division());
}
}
}
}``````

Now we're talking. You can use code tags to make your code more readable in a post.
Although you've not tried to to solve the problem you're actually stuck at (getting the user input).
Simple answer would be STFW. Top 2 matches have code that you can copy.
Here is what I found

``````import java.io.*;
public static void main (String[] args) {
//  prompt the user to enter their name
//  open up standard input
//  read the username from the command-line; need to use try/catch with the
try {
} catch (IOException ioe) {