<span>OCW is the material used for various online courses offered by MIT, while EDX is the course itself in which you will be able to receive a certification if you passed all the requirements needed to be accomplished. In this course you are graded based on your knowledge.
</span>
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:
I do have Y.O.U.T.U.B.E.
Explanation:
1. Go on Y.O.U.T.U.B.E app.
2. Create account or log in to an existing account.
3. In the welcome screen, click the button of a camera on the top right corner next to your photo icon.
4. Click "Upload Video"
5. Then upload your video.
6. Add a description and details
7. Done! Just upload to on Y.O.U.T.U.B.E.
I hope this helps! Thank you:)