Hi,
Thanks for the link but I've already got the resources I need in order to revise : ). I was mainly looking for advice about Open Book Programming/Java exams. However, thanks for finding me the...
Type: Posts; User: maths94
Hi,
Thanks for the link but I've already got the resources I need in order to revise : ). I was mainly looking for advice about Open Book Programming/Java exams. However, thanks for finding me the...
Sorry if this post is off topic, i'm not too sure but thought i'd post it anyway! if needs be you can delete this. But, I am just looking for some advice from programmers : ) this seemed like the...
Assessed work
I want to learn from what i'm doing, so please no answers/spoilers.
I'm required to create a program that finds the minimum value in an Array of integers.
Here is my approach :...
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 =...
Basically, it's a pizza, Pre-defined Pizza e.g. margarita so i've got topping objects, base ect but i need to somehow combine them to make a 'predefined' pizza
Someone suggested a hashMap, could this work?
Thanks a lot. Do you mind if i send you a pm with my current code, because the structure is extremely distinctive; and it's quite difficult trying to follow this with my structure. Since it's a...
Hypothetically speaking if i had multiple objects all being drinks e.g. coke, fanta and sprite. I then wanted a new object that is a drink, but is a combination of coke, fanta and sprite ( in a new...
/*
*/
import java.util.ArrayList;
import java.util.List;
import java.text.DecimalFormat;
public class Pizza
{
//Cost and name