/**
 * Part of a series of Child classes.
 *
 *  Simple example of inheritance
 *  Child4 has all Parent methods
 *  also has own method sayValue
 *  also has its own constructor
 *      which uses Parent's constructor
 *
 * @author Mark Young (A00000000)
 */
public class Child4 extends Parent2 {

    /**
     * Create this child with value and number.
     *
     * @param reqValue the requested value (in Parent)
     */
    public Child4(String reqValue) {
        // create my Parent2 part using the value I was given
        super(reqValue);

        // if there were more fields to initialize,
        // they'd be initialized down here
    }

    /**
     * Report this child's value.
     */
    public void sayValue() { 
        // I have a getValue method!  I inherited it.
        System.out.println("My value is " + this.getValue());
    }

}

