function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
public class PointNew{ integer x1,y1; public PointNew(integer x10,integer y10){ system.debug('PC'); x1=x10; y1=y10; } public double slope(integer x2,integer y2){ double sp; sp=(y2-y1)/(x2-x1); return sp; } public decimal distance(integer x2,integer y2){ decimal ds; ds = math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); return ds; } public void Display(){ system.debug('point is = ('+x1+','+y1+') '); } }
@isTest public class PointNewTest{ public static testMethod void name(){ PointNew pt = new PointNew(1,-4); double slp = pt.slope(-4,2); double ds = pt.distance(5,10); pt.display(); } }
If you can post your code snippet, we might be able to determine whats not working.
Thanks,
Shashank
Would you mind posting your code in a more readable format?
Thanks,
Shashank
Why you use getvalues and setValues !
i think you have parameterized constructor and it is enogh to assgin value to x1 and x2.
Test Class---
do u hav any idea abt dat