+ 1

I am a beginner, it is a language in java and I wanted to know what it fails because I know there is an error in the code, it is

inheritance objects https://code.sololearn.com/cbP9hTh104k1/?ref=app

23rd Jun 2022, 7:34 AM
daniel Miller
daniel Miller - avatar
4 ответов
0
Adding: you are creating 4 objects with 10 parameters , suitable constructor is throwing exception which you are not handling... Package for JOptionPane is not imported.. No suitable constructor exists in super class for child classes is added for last 2 classes .. hope it helps...
23rd Jun 2022, 12:51 PM
Jayakrishna 🇮🇳
0
plus - JOptionPane is not supprorted in Sololearn - depends on settings, some systems can has problem with locale character "ñ" in String tamaño - for display Vehiculo object you should write public String toString() method
23rd Jun 2022, 3:52 PM
zemiak
0
about constructor error add empty constructor Vehiculo() {} or call super constructor rhis way public CarrosDeportivos( // 3 String s1,String s2,String s3) { super( s1,s2,s3); }
23rd Jun 2022, 8:31 PM
zemiak