Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Could I get some help with making this program run?

Could I get some help with making this program run? <br/><br/><br/>What

does the super keyword represents and where can it be used? Give an example of a superclass and subclass. Be sure to make all the instances variables of the super class private. Include at least one constructor in each class and ensure that the constructor of the subclass calls the constructor of the superclass. Also include a toString method in both classes that returns the values of the instance variables with appropriate labels. Ensure that the toString method of subclass calls the toString method of the superclass so that the string returned contains the values of all the inherited instance variables.

Here is what I have:

package burger;

public class Burger extends Cheeseburger { //subclass

public void printOrder () {
super.printOrder();
System.out.println(“This burger is good.”);
}
public static void main(String[] args) {
Burger testSuper = new Burger ();
testSuper.printOrder();
}

}
………………………………………………..
package burger;

public class Cheeseburger { //superclass
public void printOrder () {
System.out.println(“This cheeseburger is good.”);
}
}

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"