Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class Material
- Private String _type
- Public Module Material(String type)
- _type = type
- End Module
- Public Module display()
- Display _type
- End Module
- End Class
- Class Furniture
- Private Material _material
- Private String _type
- Public Module set_material(Material material)
- Set _material = material
- End Module
- Public Module display()
- Display _type
- Call _material.display()
- End Module
- End Class
- Class Chair Extends Furniture
- Public Module Chair()
- Set _type = "Chair"
- End Module
- End Class
- Module main()
- Declare Furniture furniture = New Chair()
- Call furniture.set_material(New Material("Wood"))
- Call furniture.display()
- End Module
Add Comment
Please, Sign In to add comment