Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Lab1
- {
- class RightTriangle
- {
- private double a, b;
- public double A
- {
- get { return a; }
- set
- {
- if (value > 0) a = value;
- }
- }
- public double B
- {
- get { return b; }
- set
- {
- if (value > 0) b = value;
- }
- }
- private double ComputeC()
- {
- //return Math.Sqrt(a * a + b * b); //which is correct?
- //return Math.Sqrt(A * A + B * B);
- }
- public double ComputeSine()
- {
- return ComputeC() / a;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement