Class algebra.sentence
public class sentence extends entity implements Drawable, Cloneable
{}
This class holds a collection ( array ) of Words.
Field Index:
- Words[] sent
- This is the array that holds the Words.
- int numWords
- This keeps track of the number of Words in the sentence.
Constructor Index:
Method Index:
- void add( Words word )
- This is where a sentence is created and built. It accepts a Word(s),
finds its class ( using
- java.lang.Object.getClass() ) and creates a new instance
at the next position in the array
- sent[] ( using java.lang.Class. newInstance ()-- this
is the only way to
- create an object in
- Java without using new.)
- int nWords()
- This returns the number of Words in the array sent[].
- Words getWord( int i )
- This returns the Word(s) at position 'i' in the array.
- Object clone()
- draw( Graphics g, integer W, integer H, integer X, integer
Y)
- This loops from 0 to numWords-1 and calls the draw() method
of each Word(s).
algebra Package / misc
Package / Making of the project
/ Project Home Page / My
Home Page