In this exercise you will return to your SpecialityCoffee classwhich you created for the last coding activity (a sample solutionto this exercise will be shown below the entire question if you donot have yours). This time you will override the Coffee methodgetPrice which returns the price in cents for a given coffee.
The SpecialityCoffee method getPrice should return the pricegiven by the Coffee method for that object, plus an extra chargefor the flavored syrup. This extra charge is 70 cents if the coffeesize is \"large\" or \"extra large\", and 50 cents otherwise.
Remember, to submit a solution you should paste your entireSpecialityCoffee class into the coderunner, which uses its ownversion of the Coffee class.
sample code from the last coding activitypublic class SpecialityCoffee extends Coffee{ // Additional member variable private String flavor; public SpecialityCoffee(){ // Calls super-constructor to create default coffee then sets flavor super(); flavor = \"vanilla\"; } public SpecialityCoffee(String size, String type, String flavor){ // Calls constructor below with a mix of parameters and default values this(size, false, 1, type, flavor); } public SpecialityCoffee(String size, boolean isSkinny, int shots, String type, String flavor){ // Calls super-constructor tos set first 4 variables then sets flavor super(size, isSkinny, shots, type); this.flavor = flavor; } public String toString(){ // Calls Coffee toString and appends flavor to end return super.toString() + \" with \" + flavor; }}