Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Cube
- {
- private int Side;
- //This cube needs your help.
- //Define a constructor which takes one integer and assignes its value to 'Side'
- public Cube(int s)
- {
- SetSide(s);
- }
- public Cube()
- : this(0)
- {
- }
- public int GetSide()
- {
- return Side;
- }
- public void SetSide(int s)
- {
- Side = System.Math.Abs(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement