Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. int CUBE = 4; // A 4x4x4 cube
  2.  
  3. struct StockTickData
  4. {
  5. string Symbol;
  6. decimal Price;
  7. DateTime When;
  8. string Where;
  9. }
  10.  
  11. class cube{
  12. private size;
  13. public set_size(value){
  14. if (value < 0){
  15. value = -value; // makes sure we have a positive size
  16. }
  17. this.size = value
  18. }
  19. public get_size(){
  20. return this.size;
  21. }
  22. public get_volume()
  23. {
  24. return this.size*this.size*this.size
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement