How can I make an inheritance example? With a class main
and two more classes, since I have one but when joining the classes I get errors in the main class, this is a small part
public static Scanner leer= new Scanner(System.in);
void ingresarnotas(float nota1, float nota2, float nota3){
System.out.println("Ingrese");
nota1=leer.nextFloat();
nota2=leer.nextFloat();
nota3=leer.nextFloat();
}
public static float ingresarpromedio(float nota1, float nota2, float nota3){
float suma;
float promedio;
suma=nota1 + nota2 + nota3;
promedio=suma/3;
return promedio;
This is from the first class, what do you think it can be?