Im Trying Create Builder Pattern Code Java Keep Getting Error Message Icecream Icecreambui Q37126562

Im trying to create my own Builder Pattern Code in Java, but Ikeep getting an error message with Icecream and IcecreamBuilder I’mnot sure why. Here is the Code:

public abstract class IcecreamBuilder {

protected Icecream ice = new Icecream();,

public abstract void getSugar();

public abstract void getMilk();

public abstract void getEssence();

public abstract Icecream getIcecream();

}

// To build or manufacture IceCream

public class IcecreamMaker extends IcecreamBuilder {

public void getSugar() { }

public void getMilk() { }

public void getEssence() { }

public IceCream getIcecream() {

return ice;

}

Part 2 seperate Class

public class Vendor {

public Icecream createIcecream (IcecreamBuilder cream) {

cream.getSugar();

cream.getMilk();

cream.getEssence();

cream.getIcecream();
   }
}

Part 3 Main Class:

public class Main {

public static void main(String[] args){

Vendor manufacture = new

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.