Search:

Type: Posts; User: JoeBG

Search: Search took 0.09 seconds.

  1. Re: Actual and formal argument lists differ in length Error

    //A Phone class made for calling using credits and connected with Gadget superclass.

    public class Phone extends Gadget
    {
    private int credits;

    //Constructor for Phone class extending...
  2. Re: Actual and formal argument lists differ in length Error

    Well it does compile like this. But i'm trying to connect the method to a button from a GUI. (Make A Call)
    https://i.imgur.com/seDub7V.png
    And compiling without them makes the button useless.. I'm...
  3. Actual and formal argument lists differ in length Error

    Hello, i need help with my code.
    I'm trying to compile a method for making phone calls but i get an error that i'm not sure why. (BlueJ)
    https://i.imgur.com/0x3XOD3.png

    Here is the code...
  4. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    Ok so i manage to compile everything.
    My current code is:


    public class Phone extends Gadget
    {
    private int credits;

    public Phone(String themodel, double theprice, int theweight,...
  5. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    I have't added anything extra. This is my entire code for the Phone class


    public class Phone extends Gadget
    {
    private int credits;

    public Phone(String themodel, double theprice,...
  6. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    Oh ok, so i've added the arguments to the super call and the error disappeared. Now i have another error for the 2nd part "credits = theCredits;" saying:
    cannot find symbol - variable theCredits

    ...
  7. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    The error message i'm getting now is:
    constructor Gadget in class Gadget cannot be applied to given types;
    required: java.lang.String,double,int,java.lang.String
    found: no arguments
    reason:...
  8. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    Ok so i removed the return and changed the constructor to Phone instead of Gadget but it still doesn't compile :(


    public class Phone extends Gadget
    {
    private int credits;
    private int...
  9. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    Well i think that i already have a constructor and a method but it still doesn't want to Compile..


    public class Phone extends Gadget
    {
    private int credits;
    private int balance;

    ...
  10. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    I'm sorry but i can't understand. Can you please give me an example? Am i supposed to add something before the super call?
    I probably look stupid right now but i really need to understand what my...
  11. Replies
    17
    Views
    945

    [SOLVED] Re: BlueJ inheritance Issue. Please Help.

    The error code is "call to super must be first statement in constructor". But i believe that it's already the first statement..
    There is also another message:
    constructor Gadget in class Gadget...
  12. Replies
    17
    Views
    945

    [SOLVED] BlueJ inheritance Issue. Please Help.

    Hello,

    I'm working on my coursework and the task is to create inheritance using "super"
    3473
    This is the structure.



    public class Gadget
    {
Results 1 to 12 of 12