Answer:
public class Calculator {
public double add(int a, int b){
return a+b;
}
public double substract(int a, int b){
return a-b;
}
public double multiply(int a, int b){
return a*b;
}
public double divide(int a, int b){
if(b>0){
return a/b;
}
else{
System.out.println("Cannot divide by zero");
}
return -1;
}
}
Explanation:
- Using Java Programming Language, the class Calculator is created. There are no fields (Instance variables) and no constructors since these are not required by the question.
- Four methods (functions) are created: add, substract, multiply and divide as specified in the question.
- Note the use of the if statement in the divide() to handle case of illegal division (by 0)
Answer:
Outline view
Explanation:
This is a formatted window that shows all text, headers, and titles in a popup on the left side of the screen. Slide master shows all the slides but includes slide details such as inserted images and smart art.
Answer:
maybe because you did not sign up and do the trial so you probably cant see answers anymore.
Explanation:
The power given to a person in a supervisory position who makes decisions and actions by subordinates. An engineer manager is an example of like authority.
<span>offer to learn the new programming software tools
</span>