Beispiel #1
0
        /*
         * constructor of the class RoadBikeBuilder that takes a parameter of AbstractRoadBike and
         * assigns that parameter to the the class field _roadBikeInProgress
         */

        public RoadBikeBuilder(AbstractRoadBike roadBike)
        {
            this._roadBikeInProgress = roadBike;

            /*
             * method
             * public -accessmodifier
             * override - used to define its behavior instead of the parent class that is extends
             * void - noreturn type
             */
        }
 public RoadBikeBuilder(AbstractRoadBike roadBike)
 {
     this._roadBikeInProgress = roadBike;
 }
Beispiel #3
0
        /* Constructor of the class RoadBikeBuilder that takes a paramenter of AbstractRoadBike
         * and assigns that parameter to the class field _roadBikeinProgress. */

        public RoadBikeBuilder(AbstractRoadBike roadBike)
        {
            this._roadBikeInProgress = roadBike; // roadBike is the value assigned to the field
        }