What is the best method to convert java source code into a data flow diagram? And also is there any method to identify the main elements in a data flow diagram by referring the java source code programmatically.
Asked
Active
Viewed 775 times
0
-
1https://stackoverflow.com/questions/10474008/how-to-create-data-flow-diagrams-using-java – Michael Oct 21 '19 at 16:38
-
1https://stackoverflow.com/questions/12743107/how-to-create-data-flow-diagram-for-java-source-code – Michael Oct 21 '19 at 16:38
-
1https://stackoverflow.com/questions/6732408/how-can-i-make-a-flow-diagram-of-my-program – Michael Oct 21 '19 at 16:38
1 Answers
0
public class Pregunta1 {
public static void main(String[] args) {
Scanner teclado = new Scanner(System.in);
String alumno;
double n1, n2, n3, promedio;
System.out.print("Nombre de alumno: ");
alumno = teclado.nextLine();
System.out.print("Nota1: ");
n1 = Double.parseDouble(teclado.nextLine());
System.out.print("Nota1: ");
n2 = Double.parseDouble(teclado.nextLine());
System.out.print("Nota1: ");
n3 = Double.parseDouble(teclado.nextLine());
promedio = (n1 + n2 + n3) / 3;
System.out.println("promedio: " + promedio);
if (promedio >= 7) {
System.out.println("Promocionado");
} else if (promedio >= 4 && promedio < 7) {
System.out.println("Regular");
} else if (promedio < 4) {
System.out.println("Reprobado");
}
}
}
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – alea May 18 '23 at 06:04