//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...
Type: Posts; User: JoeBG
//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...
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...
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...
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,...
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,...
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
...
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:...
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...
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;
...
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...
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...
Hello,
I'm working on my coursework and the task is to create inheritance using "super"
3473
This is the structure.
public class Gadget
{