Skip to main content
se añadieron 127 caracteres en el cuerpo
Origen Enlace
A. Cedano
  • 95.2k
  • 31
  • 145
  • 257
class NotaProg1 {
 
    public static double NotaProg1Cont (double eval1,double eval2,double 
ent,double clase){
        if (eval2 < 5)
 
        {
             return 0;
        }
        else
        { 
             return (eval1* 0.20)+(eval2 *0.5)+ (ent * 0.2) + (clase * 0.1);
        }
    }

    public static double NotaProg1(double evalCont,double examenFinal){

        if (evalCont == 1)
        {
             return NotaProg1Cont();
        }
        else
        {
             return examenFinal;
 }
  
    
   }






 

     }

public static void main (String args[]){
     double eval1=7.6;
     double eval2=7;
     double ent=9.5;
     double clase=8.3;
     double evalCont= 1;
     double examenFinal=9;

     System.out.println("NotaProg1Cont=" + NotaProg1Cont(eval1,eval2,ent,clase));
     System.out.println("NotaProg=" + NotaProg1(evalCont,examenFinal));
  
 
 }// final de main 

 }

// cuando Cuando llamo a la función "NotaProg1Cont""NotaProg1Cont" dentro de mi otra función "NotaProg", me sale el siguiente error,"The method NotaProg1Cont(double, double, double, double) in the type NotaProg1 is not applicable for the arguments ()":

"The method NotaProg1Cont(double, double, double, double) in the type NotaProg1 is not applicable for the arguments ()"

class NotaProg1 {
 
public static double NotaProg1Cont (double eval1,double eval2,double 
ent,double clase){
if (eval2 < 5)
 
{
 return 0;
}
else
{ 
return (eval1* 0.20)+(eval2 *0.5)+ (ent * 0.2) + (clase * 0.1);
}
}

public static double NotaProg1(double evalCont,double examenFinal){

 if (evalCont == 1)
 {
   return NotaProg1Cont();
 }
 else
 {
   return examenFinal;
 }
  
    
  }






 



public static void main (String args[]){
double eval1=7.6;
double eval2=7;
double ent=9.5;
double clase=8.3;
double evalCont= 1;
double examenFinal=9;

System.out.println("NotaProg1Cont=" + NotaProg1Cont(eval1,eval2,ent,clase));
System.out.println("NotaProg=" + NotaProg1(evalCont,examenFinal));
  
 
 }// final de main
 }

// cuando llamo a la función "NotaProg1Cont" dentro de mi otra función "NotaProg", me sale el siguiente error,"The method NotaProg1Cont(double, double, double, double) in the type NotaProg1 is not applicable for the arguments ()"

class NotaProg1 {
    public static double NotaProg1Cont (double eval1,double eval2,double 
ent,double clase){
        if (eval2 < 5)
        {
             return 0;
        }
        else
        { 
             return (eval1* 0.20)+(eval2 *0.5)+ (ent * 0.2) + (clase * 0.1);
        }
    }

    public static double NotaProg1(double evalCont,double examenFinal){

        if (evalCont == 1)
        {
             return NotaProg1Cont();
        }
        else
        {
             return examenFinal;
        }

     }

public static void main (String args[]){
     double eval1=7.6;
     double eval2=7;
     double ent=9.5;
     double clase=8.3;
     double evalCont= 1;
     double examenFinal=9;

     System.out.println("NotaProg1Cont=" + NotaProg1Cont(eval1,eval2,ent,clase));
     System.out.println("NotaProg=" + NotaProg1(evalCont,examenFinal));
  
 }// final de main 

 }

Cuando llamo a la función "NotaProg1Cont" dentro de mi otra función "NotaProg", me sale el siguiente error:

"The method NotaProg1Cont(double, double, double, double) in the type NotaProg1 is not applicable for the arguments ()"

Origen Enlace

tengo un error al llamar a mi función en java

class NotaProg1 {

public static double NotaProg1Cont (double eval1,double eval2,double 
ent,double clase){
if (eval2 < 5)

{
 return 0;
}
else
{ 
return (eval1* 0.20)+(eval2 *0.5)+ (ent * 0.2) + (clase * 0.1);
}
}

public static double NotaProg1(double evalCont,double examenFinal){

 if (evalCont == 1)
 {
   return NotaProg1Cont();
 }
 else
 {
   return examenFinal;
 }
  
   
 }










public static void main (String args[]){
double eval1=7.6;
double eval2=7;
double ent=9.5;
double clase=8.3;
double evalCont= 1;
double examenFinal=9;

System.out.println("NotaProg1Cont=" + NotaProg1Cont(eval1,eval2,ent,clase));
System.out.println("NotaProg=" + NotaProg1(evalCont,examenFinal));
  

 }// final de main
 }

// cuando llamo a la función "NotaProg1Cont" dentro de mi otra función "NotaProg", me sale el siguiente error,"The method NotaProg1Cont(double, double, double, double) in the type NotaProg1 is not applicable for the arguments ()"