Search:

Type: Posts; User: maths94

Page 1 of 3 1 2 3

Search: Search took 0.12 seconds.

  1. Replies
    4
    Views
    180

    Re: Java Exam - Open Book

    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...
  2. Replies
    4
    Views
    180

    Java Exam - Open Book

    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...
  3. Java - Problem getting my program functions

    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 :...
  4. Replies
    33
    Views
    282

    Re: Setters and getters

    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...
  5. Replies
    33
    Views
    282

    Re: Setters and getters

    Do you know why



    boolean vegetarian = true;
    if (bacon.getType().equals("bacon")||(prawn.getType().equals("prawn"))) {

    vegetarian = false;
    System.out.println("This...
  6. Replies
    33
    Views
    282

    Re: Setters and getters

    Well i showed the code in a previous post, i've went over and over and they're definitely the same
  7. Replies
    33
    Views
    282

    Re: Setters and getters

    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...
  8. Replies
    33
    Views
    282

    Re: Setters and getters

    dddddddddddddddddddddddddddddd
  9. Replies
    33
    Views
    282

    Re: Setters and getters

    I've already got this down at the moment, but different object name. Can you show an example of using pm with method, please?
  10. Replies
    33
    Views
    282

    Re: Setters and getters

    I know how to create a class =/ i mean i don't know how to test each class, just call the class?
  11. Replies
    33
    Views
    282

    Re: Setters and getters

    How can i do my testing class =/ cheers
  12. Replies
    33
    Views
    282

    Re: Setters and getters

    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..
  13. Replies
    33
    Views
    282

    Re: Setters and getters

    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"
  14. Replies
    33
    Views
    282

    Re: Setters and getters

    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
  15. Replies
    33
    Views
    282

    Re: Setters and getters

    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;
  16. Replies
    33
    Views
    282

    Re: Setters and getters

    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
  17. Replies
    33
    Views
    282

    Re: Setters and getters

    I've deleted the others, but it's definitely the correct one
  18. Replies
    33
    Views
    282

    Re: Setters and getters

    I may sound like an idiot, but how do you check =/
  19. Replies
    33
    Views
    282

    Re: Setters and getters

    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();
  20. Replies
    33
    Views
    282

    Setters and getters

    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 =...
  21. Thread: Objects

    by maths94
    Replies
    9
    Views
    176

    Re: Objects

    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
  22. Thread: Objects

    by maths94
    Replies
    9
    Views
    176

    Re: Objects

    Someone suggested a hashMap, could this work?
  23. Thread: Objects

    by maths94
    Replies
    9
    Views
    176

    Re: Objects

    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...
  24. Thread: Objects

    by maths94
    Replies
    9
    Views
    176

    Objects

    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...
  25. Replies
    10
    Views
    444

    Re: Java general question

    /*
    */

    import java.util.ArrayList;
    import java.util.List;
    import java.text.DecimalFormat;

    public class Pizza
    {
    //Cost and name
Results 1 to 25 of 51
Page 1 of 3 1 2 3