java - Constructor of a class cannot be applied to the given type -


i trying save data using arraylist (i have software class extends products):

class software extends products{      private float ram;     private float processor;      public software (int productid,string productname,int productyear,string productpublishhouse)     {         super(productid,productname, productyear, productpublishhouse);          this.ram = ram;         this.processor = processor;          // super(productid,productname, productyear, productpublishhouse);      }      public void setram(){         this.ram = ram;     }      public float getram(){         return ram;     }  } 

but in other class softwareproducts have declared ram , processor attributes in actionperformed(actionevent e) method

float ram = float.parsefloat(ramtf.gettext());         float processor = float.parsefloat(processortf.gettext()); 

i getting error on section:

software.softwarelist.add(new software(ram,processor)); 

i think have add more attributes parent class ?

the code have far not list constructor doing trying "new software(ram,processor)". in other words don't seem have constructor defined creating "software" object given 2 parameters have listed.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -