Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Slope {
- private int xone,xtwo,yone,ytwo,m;
- public Slope(int x, int y, int x2, int y2){
- xone = x;
- xtwo = x2;
- yone = y;
- ytwo = y2;
- }
- public void equation(){
- m = ((ytwo - yone)/ (xtwo - xone));
- }
- public void print(){
- System.out.println("The slope of the line is :: " + m);
- }
- }
Add Comment
Please, Sign In to add comment