Está en la página 1de 9

Unidad Académica: Centro

CARRERA
Carrera: Ing. De Sistemas
Semestre: Segundo
Turno: Noche
ASIGNATURA
Código: Sis-126
Materia: Programación I
PRACTICA
Tipo de práctica: PROYECTO EXAMEN FINAL
N° de práctica:
Tema:
ESTUDIANTE
Apellidos: CHAMBI CONDE
Nombre(s): FELIX C.I 6838254 L.P.
e-mail: fox_cab@hotmail.com
DOCENTE: Ing. Edgar García Achillo
Fecha de emisión: 25 de Junio del 2013
Fecha de entrega: 25 de Junio del 2013

Gestión: 2013
LA PAZ – BOLIVIA
PROYECTO EXAMEN FINAL

REGISTRO DE NOTAS

import java.lang.*;
import java.util.Scanner;
public class Notas
{
public static String
datos[]={"Nro.","NOMBRE","APELLIDO","1er_Parcial","2do_Parcial","Examen_Final","calificacion","OBSER
VACION"};
public static float limite[]={35,35,30};
public static void main(String[] args)
{
if(autenticaUsuario())
{
String alumno[][];
float nota[][];
int cantidadEstud=0,op;
Scanner scan=new Scanner(System.in);
alumno=new String[0][3];
nota=new float[0][4];
do
{
mostrarTitulo("MENU OPCIONES");
op=menu();
if (op!=5)
{
switch (op)
{
case 1:cantidadEstud=leerNroAlumnos();alumno=new String[cantidadEstud][3];
registraAlumno(alumno);break;
case 2:
if(cantidadEstud>0)
{
nota=new float[cantidadEstud][4];registraNotas(alumno,nota);
}
else
System.out.print("Registre Datos del Estudiante...");
break;
case 3:
if(nota.length>0)
{
reporteNotas(alumno,nota);System.out.println();
}
else
System.out.print("Registre Notas del Estudiante...");
break;
case 4: acercaDeSIREN();break;
}
}
}while(op!=5);
}
else
System.out.print("!!!!!!!!!ERROR !!!!!!!!!!!");
}
public static boolean autenticaUsuario()
{
int cantIntentos=0;
Scanner scan=new Scanner(System.in);
String usr="", pwd="";
mostrarTitulo("");
System.out.println();
while(!(usr.equals("felix") && pwd.equals("chambi")) && cantIntentos<4)
{
System.out.print("Usuario:");usr=scan.next();
System.out.print("Contrasena:");pwd=scan.next();
cantIntentos++;
}
if(cantIntentos<4)
return true;
else
return false;
}
public static int menu()
{
int op;
Scanner scan =new Scanner(System.in);
do
{System.out.println();
System.out.println("1. Registro de datos");
System.out.println("2. Registro de notas");
System.out.println("3. Reporte de notas");
System.out.println("4. Acerca del SIREN");
System.out.println("5. Salir");
System.out.print("OPCION: ");
op=scan.nextInt();
}
while(op<1 || op>5 );
return(op);
}
public static void trazaLinea(int cantColumnas,String caracter)
{
int i;
for(i=1;i<=cantColumnas;i++)
System.out.print(caracter);
}
public static double redondear(double numero,int decimales )
{
return Math.round(numero*Math.pow(10,decimales))/Math.pow(10,decimales);
}
public static void limpiarPantalla(int lineas)
{
for (int i=0; i < lineas; i++)
System.out.println();
}

public static void mostrarTitulo(String titulo)


{
trazaLinea(70,"");
System.out.println("<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>\n\n");
trazaLinea(70,"");
System.out.print("\n\t\t\t" + titulo);
}

public static String observacion(float nota)


{
String obs;
if(nota>50)
obs="APROBADO";
else
if(nota>=40 && nota <=50)
obs="2DO. TURNO";
else
obs="REPROBADO";
return(obs);
}
public static void registraAlumno(String alum[][])
{
Scanner scan=new Scanner(System.in);
int i,j;
limpiarPantalla(30);
mostrarTitulo("RESGIRTRO DE ESTUDIANTES");
System.out.print("\n");
for(i=0;i<alum.length;i++)
{
alum[i][0]=" " + (i+1);
System.out.println("\nEstuadiante " + alum[i][0] + ": ");
for(j=1;j<3;j++)
{
System.out.print("\t"+datos[j]+" :");
alum[i][j]=scan.next();
}
}
}
public static void registraNotas(String alum[][],float notas[][])
{
Scanner scan=new Scanner(System.in);
float sumaNotas;
int i,j;
mostrarTitulo("RESGIRTRO DE NOTAS");
for(i=0;i<alum.length;i++)
{System.out.println("\n Estudiante "+alum[i][1]+ " " + alum[i][2]);
sumaNotas=0;
for(j=1;j<4;j++)
{
System.out.print("\n\t" + datos[j+2]+"(0 a " + limite[j-1]+") :");
notas[i][j-1]=leerNota(0,limite[j-1]);
sumaNotas=sumaNotas+notas[i][j-1];
}
notas[i][3]=sumaNotas;
}
}
public static void reporteNotas(String alum[][],float notas[][])
{
int i,j;
mostrarTitulo("REPORTE DE NOTAS");
System.out.print("\n");trazaLinea(110,"_");
System.out.print("\n\n"+datos[0] + "\t" + datos[1] + "\t\t" + datos[2]+"\t"+datos[3]+"\
t"+datos[4]+"\t"+ datos[5]+ "\t" + datos[6]+ "\t" + datos[7]+"\n");
trazaLinea(110,"_");System.out.print("\n");
for(i=0;i<alum.length;i++)
{
System.out.print("\n"+alum[i][0] + "\t" + alum[i][1] + "\t\t"+alum[i][2]+ "\t\t" +
notas[i][0]+"\t\t"+notas[i][1]+"\t\t"+notas[i][2]+"\t\t"+ redondear(notas[i][3],2)+ "\t" +
observacion(notas[i][3]));
System.out.print("\n");
}
trazaLinea(110,"_");
}
public static void acercaDeSIREN()
{
mostrarTitulo("ACERCA DE SIREN");
System.out.println();trazaLinea(70,"");
System.out.print("__________________________________________________________\n");
System.out.print("___ ___\n");
System.out.print("___ SISTEMA DE REGISTRO DE CALIFICACIONES ___\n");
System.out.print("__________________________________________________________\n");
System.out.print("__________________________________________Universidad: UTB\n");
System.out.print("__________________________________________________________\n");
System.out.print("_________________________________Carrera: Ing. de Sistemas\n");
System.out.print("__________________________________________________________\n");
System.out.print("___________________________________Materia: Programación I\n");
System.out.print("__________________________________________________________\n");
System.out.print("________________________________Docente: Ing. Edgar Garcia\n");
System.out.print("__________________________________________________________\n");
System.out.print("______________________________________________Turno: Noche\n");
System.out.print("__________________________________________________________\n");
System.out.print("___________________________________________Unidad: Central\n");
System.out.print("__________________________________________________________\n");
System.out.print("________________________________Alumno: Felix Chambi Conde\n");
System.out.print("__________________________________________________________\n");
System.out.print("__________________________________________La Paz - Bolivia\n");
System.out.print("__________________________________________________________\n");
System.out.print("________________________________________________Junio 2013\n");
System.out.print("__________________________________________________________\n");
trazaLinea(70,"");System.out.println();
}
public static float leerNota(float limInf,float limSup)
{Scanner scan=new Scanner(System.in);
float nota;
do{
nota=scan.nextFloat();
}while(nota<limInf||nota>limSup);
return(nota);
}
public static int leerNroAlumnos()
{Scanner scan=new Scanner(System.in);
int filas;
do{System.out.print("Ingrese numero de alumnos:");
filas=scan.nextInt();
}while(filas<1);
return filas;
}
}
<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏϧÏ
¼¼§ÏUsuario:DAYSI
¼¼§ÏContrasena:CHOQUE
¼¼§ÏUsuario:MARIA
¼¼§ÏContrasena:UIL
¼¼§ÏUsuario:EVER
¼¼§ÏContrasena:DFR
¼¼§ÏUsuario:ERTG
¼¼§ÏContrasena:SAD
ÏϧÏ!!!!!!!!!ERROR !!!!!!!!!!!
ÏÏ©Ï ----jGRASP: operation complete.
ÏÏÏÏ
ÏÏ«Ï ----jGRASP exec: java Notas
ÏϧÏ
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏϧÏ
¼¼§ÏUsuario:felix
¼¼§ÏContrasena:chambi
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï MENU OPCIONES
ÏϧÏ1. Registro de datos
ÏϧÏ2. Registro de notas
ÏϧÏ3. Reporte de notas
ÏϧÏ4. Acerca del SIREN
ÏϧÏ5. Salir
¼¼§ÏOPCION: 1
¼¼§ÏIngrese numero de alumnos:4
ÏϧÏÏϧÏ
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï RESGIRTRO DE ESTUDIANTES
ÏϧÏ
ÏϧÏEstuadiante 1:
¼¼§Ï NOMBRE :felix
¼¼§Ï APELLIDO :chambi
ÏϧÏ
ÏϧÏEstuadiante 2:
¼¼§Ï NOMBRE :daysi
¼¼§Ï APELLIDO :choque
ÏϧÏ
ÏϧÏEstuadiante 3:
¼¼§Ï NOMBRE :maria
¼¼§Ï APELLIDO :juana
ÏϧÏ
ÏϧÏEstuadiante 4:
¼¼§Ï NOMBRE :juan
¼¼§Ï APELLIDO :reporte
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï MENU OPCIONES
ÏϧÏ1. Registro de datos
ÏϧÏ2. Registro de notas
ÏϧÏ3. Reporte de notas
ÏϧÏ4. Acerca del SIREN
ÏϧÏ5. Salir
¼¼§ÏOPCION: 2
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï RESGIRTRO DE NOTAS
ÏÏ§Ï Estudiante felix chambi
ÏϧÏ
¼¼§Ï 1er_Parcial(0 a 35.0) :25
ÏϧÏ
¼¼§Ï 2do_Parcial(0 a 35.0) :20
ÏϧÏ
¼¼§Ï Examen_Final(0 a 30.0) :15
ÏϧÏ
ÏÏ§Ï Estudiante daysi choque
ÏϧÏ
¼¼§Ï 1er_Parcial(0 a 35.0) :25
ÏϧÏ
¼¼§Ï 2do_Parcial(0 a 35.0) :16
ÏϧÏ
¼¼§Ï Examen_Final(0 a 30.0) :20
ÏϧÏ
ÏÏ§Ï Estudiante maria juana
ÏϧÏ
¼¼§Ï 1er_Parcial(0 a 35.0) :15
ÏϧÏ
¼¼§Ï 2do_Parcial(0 a 35.0) :15
ÏϧÏ
¼¼§Ï Examen_Final(0 a 30.0) :12
ÏϧÏ
ÏÏ§Ï Estudiante juan reporte
ÏϧÏ
¼¼§Ï 1er_Parcial(0 a 35.0) :12
ÏϧÏ
¼¼§Ï 2do_Parcial(0 a 35.0) :10
ÏϧÏ
¼¼§Ï Examen_Final(0 a 30.0) :8
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï MENU OPCIONES
ÏϧÏ1. Registro de datos
ÏϧÏ2. Registro de notas
ÏϧÏ3. Reporte de notas
ÏϧÏ4. Acerca del SIREN
ÏϧÏ5. Salir
¼¼§ OPCION: 3
ÏϧÏ<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>
ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï REPORTE DE NOTAS
ÏϧÏ______________________________________________________________________________________________________________
ÏϧÏ
ÏNro. NOMBRE APELLIDO 1er_Parcial 2do_Parcial Examen_Final calificacion OBSERVACION
ÏϧÏ______________________________________________________________________________________________________________
ÏϧÏ
ÏÏ§Ï 1 felix chambi 25.0 20.0 15.0 60.0 APROBADO
ÏϧÏ
ÏÏ§Ï 2 daysi choque 25.0 16.0 20.0 61.0 APROBADO
ÏϧÏ
ÏÏ§Ï 3 maria juana 15.0 15.0 12.0 42.0 2DO. TURNO
ÏϧÏ
ÏÏ§Ï 4 juan reporte 12.0 10.0 8.0 30.0 REPROBADO
ÏϧÏ______________________________________________________________________________________________________________
Ïϧ

Ï<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>


ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï MENU OPCIONES
ÏϧÏ1. Registro de datos
ÏϧÏ2. Registro de notas
ÏϧÏ3. Reporte de notas
ÏϧÏ4. Acerca del SIREN
ÏϧÏ5. Salir
¼¼§ÏOPCION: 4

<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>


ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï ACERCA DE SIREN
ÏϧÏ_______________________________________________________________
ÏϧÏ___ ___
ÏϧÏ___ SISTEMA DE REGISTRO DE CALIFICACIONES ___
ÏϧÏ_______________________________________________________________
ÏϧÏ_______________________________________________Universidad: UTB
ÏϧÏ_______________________________________________________________
ÏϧÏ______________________________________Carrera: Ing. de Sistemas
ÏϧÏ_______________________________________________________________
ÏϧÏ________________________________________Materia: Programación I
ÏϧÏ_______________________________________________________________
ÏϧÏ_____________________________________Docente: Ing. Edgar Garcia
ÏϧÏ_______________________________________________________________
ÏϧÏ___________________________________________________Turno: Noche
ÏϧÏ_______________________________________________________________
ÏϧÏ________________________________________________Unidad: Central
ÏϧÏ_______________________________________________________________
ÏϧÏ_____________________________________Alumno: Felix Chambi Conde
ÏϧÏ_______________________________________________________________
ÏϧÏ_______________________________________________La Paz - Bolivia
ÏϧÏ_______________________________________________________________
ÏϧÏ_____________________________________________________Junio 2013
ÏϧÏ_______________________________________________________________

<<<<<<<<<<<<< SISTEMA DE REGISTRO DE CALIFICACIONES >>>>>>>>>>>>>


ÏϧÏ
ÏϧÏ
ÏϧÏ
ÏÏ§Ï MENU OPCIONES
ÏϧÏ1. Registro de datos
ÏϧÏ2. Registro de notas
ÏϧÏ3. Reporte de notas
ÏϧÏ4. Acerca del SIREN
ÏϧÏ5. Salir
¼¼§ÏOPCION: 5
ÏϧÏ
ÏÏ©Ï ----jGRASP: operation complete.

ÏÏ©Ï ----jGRASP: operation complete.


¼¼ÏÏ

También podría gustarte