Exception in thread "main" java.lang.NullPointerException
at PizzaChoice.main(PizzaChoice.java:150)
and if (bacon.getType().equals("bacon")||(prawn.getType().equals("prawn"))) {
sorry about...
Type: Posts; User: maths94
Exception in thread "main" java.lang.NullPointerException
at PizzaChoice.main(PizzaChoice.java:150)
and if (bacon.getType().equals("bacon")||(prawn.getType().equals("prawn"))) {
sorry about...
Do you know why
boolean vegetarian = true;
if (bacon.getType().equals("bacon")||(prawn.getType().equals("prawn"))) {
vegetarian = false;
System.out.println("This...
Well i showed the code in a previous post, i've went over and over and they're definitely the same
Yeah but the compiler is telling me that "The method geteggPrawn() is undefined for the type Pizza" yet it works for the other without an error, even though i don't have get method in pizza, it's in...
dddddddddddddddddddddddddddddd
I've already got this down at the moment, but different object name. Can you show an example of using pm with method, please?
I know how to create a class =/ i mean i don't know how to test each class, just call the class?
How can i do my testing class =/ cheers
Is it ok that when you've looked at it, and if the problem is resolved. Can i edit my post and remove the code? don't want others stealing you see..
It won't allow me to do that, receive an error message "Implicit super constructor PizzaBase() is undefined for default constructor. Must define an explicit constructor"
The method is defined in the PizzaBase class, so how can i define it in both, i'm required to use extend on pizza because it contains all the toppings that i'll need
I kinda just copied the way i done with my other getters and setters. So in my Pizza class the only thing i have related to this is
static public double MargheritaCost;
Are you sure i don't it correctly ? sorry i'm just becoming really aggravated, i haven't progressed in 3 days and it needs to be done for friday. Becoming worried ;p
I've deleted the others, but it's definitely the correct one
I may sound like an idiot, but how do you check =/
The method setMargheritaCost(double) is undefined for the type Pizza
I'm using extends
public class PizzaMenu extends Pizza {
void Margherita ()
{
Pizza p=new Pizza();
I'm trying to try and set the cost of the pizza, in one class i have :
public double MargheritaCost;
public void setMargheritaCost(double MargheritaCost) {
this.MargheritaCost =...