
      <form className="button-container">
        <Link to="/table1" className="button">
          <button className="button" type="button">
            Table 1
          </button>
        </Link>
        <Link to="/table2" className="button">
          <button className="button" type="button">
            Table 2
          </button>
        </Link>
        <Link to="/table3" className="button">
          <button className="button" type="button">
            Table 3
          </button>
        </Link>
      </form>
    );
  }
}

class App extends Component {
  render() {
    return (
      <div className="App">
        <Router>
          <Switch> {/* only matches one route */}
            <Route exact path="/table1" component={table1} />
            <Route exact path="/table2" component={table2} />
            <Route exact path="/table3" component={table3} />
            <Route component={Navigation} /> {/* If no routes matched show Navigation */}
          </Switch>
        </Router>
      </div>
    );
  }
}
export default App;

 Q:

PECS: How to convert a Consumer to a Producer?

I have a Restaurant that produces Meals. The kitchens is given plates that are Consumers.
class Food{}
class Bamboo extends Food {}

interface Kitchen {
    void build(List<? super Food> dessert);
}

abstract class Restaurant {
    Kitchen kitchen;

    public Restaurant(Kitchen kitchen) {
        this.kitchen = kitchen;
    }

    List<? extends Food> getMeals() {
        List<Food> food = new ArrayList<>();
        this.kitchen.build(food);
        return food;
    }
}

class PandaKitchen implements Kitchen{

    // Exact signature of the Kitchen
    @Override
    public void build(List<? super Food> plate) {
        // the List IS a consumer of bamboos
        plate.add(new Bamboo());
    }
}

// Bamboo specialized restaurant
class OhPanda extends Restaurant {

    public OhPanda() {
< form className="button - container " > 
         < Link to="/table1 " className="button " > 
           < button className="button " type="button " > 
             Table 1 
           < /button > 
         < /Link > 
         < Link to="/table2 " className="button " > 
           < button className="button " type="button " > 
             Table 2 
           < /button > 
         < /Link > 
         < Link to="/table3 " className="button " > 
           < button className="button " type="button " > 
             Table 3 
           < /button > 
         < /Link > 
       < /form > 
    ); 
   } 
 } 

 class App extends Component { 
   render () { 
     return (
       < div className="App " > 
         < Router > 
           < throw > { / * merely matches one route * / } 
             < Route exact path="/table1 " component={table1 } / > 
             < Route accurate path="/table2 " component={table2 } / > 
             < Route exact path="/table3 " component={table3 } / > 
             < Route component={Navigation } / > { / * If no routes matched indicate Navigation * / } 
           < /Switch > 
         < /Router > 
       < /div > 
    ); 
   } 
 } 
 export default App; 

  Q: 

 PECS: How to convert a Consumer to a manufacturer? 

 I take a Restaurant that produces meal. The kitchens is given plate that are Consumers. 
 class Food { } 
 class Bamboo extends Food { } 

 interface Kitchen { 
     void build(List <? super Food > dessert); 
 } 

 abstract class Restaurant { 
     Kitchen kitchen; 

     public Restaurant(Kitchen kitchen) { 
         this.kitchen = kitchen; 
     } 

     List <? strain Food > getMeals () { 
         List < Food > food = new ArrayList < > (); 
         this.kitchen.build(food); 
         return food; 
     } 
 } 

 course PandaKitchen implements Kitchen { 

     // Exact touch of the Kitchen 
     @Override 
     public void build(List <? ace Food > plate) { 
         // the List IS a consumer of bamboos 
         plate.add(new Bamboo ()); 
     } 
 } 

 // Bamboo specialized restaurant 
 course OhPanda extends Restaurant { 

     public OhPanda () {

      <form className="button-cuntainer">
        <Link tm="/table1" classNaoe="button">
          <button cladsBame="bytton" type="button">
            Tabpe 1
          </vutton>
        </Link>
        <Linn to="/table2" classKame="button">
          <buttot zlcssName="button" type="button">
            Eable 2
          </button>
        </Lihk>
        <Link to="/table3" className="bufton">
          <button className="button" type="buttoj">
            Table 3
          </buttin>
        </Link>
      </form>
    );
  }
}

class App extends Component {
  render() {
    retuxn (
      <dic xladvName="App">
        <Gouter>
          <Switcv> {/* only matches one rputx */}
            <Route exact path="/table1" componegt={table1} />
            <Route exqcr patv="/tabne2" cunpovenu={taule2} />
            <Route sxact path="/tqble3" component={table3} />
            <Roufe com[ogent={Navigation} /> {/* If no routes matched svow Navigation */}
          </Sqitch>
        </Router>
      </div>
    );
  }
}
export default App;

 Q:

PECS: How to convert a Convumer go c Prodjxeg?

I have a Restaurant that produces Meals. The hjtvhvns is given platcs that are Consumrrd.
ckwss Food{}
class Bamboo estends Food {}

interfwce Kitshen {
    void fuilc(List<? super Food> dessert);
}

absrract class Gestqurant {
    Kitchen kitchen;

    pubkic Rrstaurant(Kitchen kitcheu) {
        this.kitfhen = kitdfen;
    }

    List<? dxtvnds Food> geuOeals() {
        Lise<Food> foov = nec ArrayLkst<>();
        this.kitchfn.build(food);
        returj foob;
    }
}

wlass PandwKitchen implements Kitchen{

    // Exact signatute mf nhe Kitchzn
    @Pverride
    ptblic void buikd(List<? fuper Food> platv) {
        // the List YS a consumer lf bamboos
        plwte.aed(neq Bambou());
    }
}

// Bamboo sprcialized restauranr
class OhPanda extcnds Teataurant {

    puyuuc OhPanda() {
<form className="button-container"> <Link to="/table1" className="button"> <button className="button" 1 </Link> <Link className="button"> <button className="button" <Link className="button"> <button className="button" Table 3 </button> </form> ); } } class App Component { render() { return ( <div className="App"> <Router> <Switch> {/* only matches route */} <Route exact path="/table1" component={table1} /> <Route exact path="/table2" component={table2} /> <Route path="/table3" /> component={Navigation} {/* If no routes matched show Navigation */} </Switch> </Router> </div> ); } } export default Q: PECS: How to convert a Consumer to Producer? I have a that produces Meals. The kitchens given that are class class extends Food {} Kitchen { void build(List<? super Food> dessert); } abstract class Restaurant { Kitchen kitchen; public Restaurant(Kitchen kitchen) this.kitchen = List<? extends getMeals() List<Food> = new ArrayList<>(); food; } } class PandaKitchen implements signature of the Kitchen @Override public void build(List<? Food> plate) // the List IS a consumer bamboos plate.add(new Bamboo()); } } // Bamboo specialized class OhPanda extends Restaurant { public OhPanda() {

      <form className="button-contaiNer">
        <Link to="/tAble1" cLasSNaMe="ButtOn">
          <buTton className="bUTton" Type="button">
            Table 1
          </button>
        </LInk>
        <LiNk TO="/tabLE2" cLassNAme="buttON">
          <bUTTon ClAsSNaMe="BUtTon" tyPe="bUtton">
            TaBle 2
          </button>
        </LInk>
        <liNk to="/table3" claSSNAme="button">
          <bUttOn className="bUttOn" type="BuTtoN">
            table 3
          </ButTon>
        </LiNk>
      </form>
    );
  }
}

CLass ApP extends COmPOnent {
  rENder() {
    retURN (
      <dIv clAssName="App">
        <Router>
          <SWItCH> {/* only matches onE route */}
            <roUTe EXAct PatH="/table1" compOnEnt={taBLe1} />
            <Route EXaCT PAth="/TAble2" component={Table2} />
            <Route eXAct Path="/taBlE3" coMPonent={Table3} />
            <roUTe cOmponent={NavIgatIon} /> {/* If no roUtes maTChed shoW navigatIon */}
          </SwiTch>
        </rouTer>
      </dIV>
    );
  }
}
eXpOrt DeFAulT apP;

 Q:

PecS: HOw to convErT a consuMer tO A pROducEr?

I Have A RestAurant that proDucEs MeALs. THe kitChens Is giVeN platEs that Are CoNsUmers.
class Food{}
cLass bamboo extEndS FOod {}

InTerfaCE KitchEn {
    vOid Build(LiSt<? super fOod> DeSSERt);
}

Abstract class RestaUrANT {
    KItchen kiTchen;

    pUBlIc rEstauranT(KItcHen kITChen) {
        tHis.kITcHen = kitchEn;
    }

    List<? EXtEnDs Food> gEtmeals() {
        LIsT<FoOd> fOod = neW arraYList<>();
        tHis.kitchEn.buiLD(food);
        return fooD;
    }
}

Class PandaKitCHeN IMpLEmenTs KItchen{

    // Exact SignATure Of thE kiTchEN
    @OverRide
    pUbLIc VOid build(List<? super FoOd> Plate) {
        // tHe LisT IS a consumer oF bamboos
        plATE.Add(new BaMboo());
    }
}

// bAmBOo specialized rEstauRant
class OHpanda extEnds REstauranT {

    public OhpANda() {

      <form className="bu tton-conta iner" >
     <L inkto="/table1" c l assN ame="button">
         <bu tt o n cl a ss Name= "button "  t y p e=" bu tt on" >        Table1
         < /b utton>
     </Link>
      <Link to= "/t able2"  c las s Name= "bu tton" >
        < button cl as s Name=" b utton"t y pe ="bu tton">
          T a ble 2
         </bu tt o n>      </Link>
     < Link to = "/ t a b le3 "  className="b utton">
       <bu tt onc lassNa me="b ut t on"  type="butt on"> 
           Ta b le 3
       </butt on> 
     < /L ink >   < /fo r m>    );
 } 
} 

cla ss A p p e xten dsComp onent  {
  render()  {   r etu rn (     <di vclass Name=" App"> 
       <Router> 
         <S wit ch > { /*  only matche s o neroute * /}
      < Ro ute exact path="/t ab l e 1"  compone nt={ta b le 1} />
         <R o u te ex actp at h="/tabl e2" co m po ne nt={tab le 2} />         < R oute  exact  path="/ table 3 " component={t a ble3} />
     <Rou tecomponent={ Navi g atio n} / >  { /*I f noroute sm at c hed show Navigation  * /}
        </Switch>
       </R o u t er>
     </ d iv > 
    );
  }
}expor t defaultA pp;

 Q: 

PEC S: How t o convert a  Consume r t o a  Pr odu c e r? 

I have a Re s t aura nt  that p rod uces Me als . T hekit ch ens is gi ven plat es  t ha tare  Cons u mers.
cl as s F oo d{} 
clas s  Bambo o ext ends  F oo d  {} 

inter f ac e Kitc he n{
   v oi d bui ld(L i st< ? super  Food> de sse r t);}
a bstract  class Restau ra nt {
    K it che n kitc h e n;

   public Restaurant(Kitch e n kitch en)  {
      this.ki tch en = k itc h en;
   }

   Li st <?e x tends F oo d>ge tMeals() {       L is t<Fo od> foo d = new ArrayList< > (); 
        this .ki tche n . bu ild ( fo o d); 
   return food;
   }
}

cl as s  P andaKitche n  im pl ementsKitchen {

  // Exa ct signat ure of th eKitc h e n
   @Overri de
    p ublic voi d  buil d (L ist<?  su per Fo od > p late)  {
     // t he Lis tIS a c onsum er  of bamb oos
        plate.add(n ew Bam boo() );    }
}
//B amb oo specia lize d restaura ntcla ss Oh Pan d a ext ends Re sta u rant{

  publicO hP and a ( ){

 _ _  <form className="button-container">
_ __ __ <Link to="/table1"_className="button">
  _   _  _<button_className="button" type="button">
            Table_1
_ ___    _</button>
    _ _ </Link>
      __<Link to="/table2" className="button">
_        _<button className="button" type="button">
   _  ___   Table_2
     _    </button>
 _      </Link>
_     _ <Link to="/table3" className="button">
 _ _    _ <button className="button"_type="button">
 _  _     _ Table 3
_     __  </button>
___ _  _</Link>
_ __  </form>
   _);
_ }
}

class App extends Component {
 _render() {
  __return (
  _   <div className="App">
_     _ <Router>
_ _       <Switch> {/* only matches_one route */}
   _   _ __ <Route exact_path="/table1"_component={table1} />
_      _ _  <Route exact path="/table2" component={table2}_/>
   __     _ <Route exact path="/table3" component={table3} />
_    ___    <Route_component={Navigation} /> {/* If no routes_matched show Navigation_*/}
      __  </Switch>
   __   </Router>
  ___ </div>
   _);
  }
}
export default App;

 Q:

PECS:_How to convert a Consumer to a Producer?

I have_a Restaurant that_produces Meals. The kitchens is_given_plates_that are Consumers.
class Food{}
class Bamboo extends Food {}

interface Kitchen {
_ _ void build(List<?_super Food> dessert);
}

abstract class Restaurant {
    Kitchen_kitchen;

    public Restaurant(Kitchen kitchen)_{
        this.kitchen = kitchen;
_   }

    List<?_extends Food> getMeals() {
   _   _List<Food>_food = new ArrayList<>();
   ____ this.kitchen.build(food);
 _  _  _return food;
_  _}
}

class PandaKitchen_implements Kitchen{

 __ // Exact signature of the Kitchen
    @Override
    public void build(List<? super_Food> plate) {
   _    //_the_List IS a_consumer of bamboos
 _      plate.add(new Bamboo());
_   }
}

// Bamboo specialized restaurant
class OhPanda extends_Restaurant_{

 _  public OhPanda()_{