Class declaration:
class RiceBowl 
{
}


Inheritance, protocols:
class Bowl
{
}

protocol Fillable
{
	public method fill(with rise : Rise, and vegetables : Rise.Class.List<Vegetable>)
	{
	}
}

class RiceBowl : Bowl, Fillable
{
	public method fill(with rise : Rise, and vegetables : Rise.Class.List<Vegetable>)
	{
	}
}


Class variables, methods, method variables, calls:
class RiceBowl : Bowl, Fillable
{
	public declare name : Rise.Classes.String
	private declare isFull : Rise.Classes.Boolean
	private declare vegetables : Rise.Classes.List<Vegetable>
	
	private updateName()
	{
		name = isFull ? "full bowl" : "empty bowl"
	}
	
	public method fill(with rice : Rice, and vegetables : Rise.Class.List<Vegetable>)
	{
		isFull = rise != null && vegetables != null
		
		this.vegetables = vegetables
		
		updateName()
	}
}
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki