This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Matematica | |
| def initialize(x,y) | |
| @x, @y | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | mat = Matematica.new(1,4) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Matematica | |
| def initialize(x,y) | |
| @x = x | |
| @y = y | |
| end | |
| def to_s | |
| "(#@x,#@y)" | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Matematica | |
| def initialize(x,y) | |
| @x = x | |
| @y = y | |
| end | |
| end | |
| m = Matematica.new(3,4) | |
| puts m | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Pessoa | |
| def hello | |
| puts 'Hello' | |
| end | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Product < ActiveRecord::Base | |
| validates_presence_of :nome, :descricao | |
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class CreateProducts < ActiveRecord::Migration | |
| def self.up | |
| create_table :products do |t| | |
| t.string :nome | |
| t.text :descricao | |
| t.timestamps | |
| end | |
| end | |
| def self.down | |
| drop_table :products | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.io.Serializable; | |
| import java.util.Date; | |
| import javax.persistence.Entity; | |
| import javax.persistence.Id; | |
| import javax.persistence.PrePersist; | |
| import javax.persistence.PreUpdate; | |
| @Entity | |
| public class Product implements Serializable { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import static org.junit.Assert.*; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| public class test_stack{ | |
| private Stack ste; | |
| @Before | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class Stack { | |
| private Element top; | |
| private Integer tam; | |
| private Element temp; | |
| public Stack(){ | |
| this.top = null; | |
| this.tam = 0; |