diff --git a/TramitesAcademicos.iml b/TramitesAcademicos.iml new file mode 100644 index 0000000..9465dd8 --- /dev/null +++ b/TramitesAcademicos.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/TramitesAcademicos/Alumno.class b/out/production/TramitesAcademicos/Alumno.class new file mode 100644 index 0000000..7b94b1b Binary files /dev/null and b/out/production/TramitesAcademicos/Alumno.class differ diff --git a/out/production/TramitesAcademicos/Asignatura.class b/out/production/TramitesAcademicos/Asignatura.class new file mode 100644 index 0000000..f5d2d9f Binary files /dev/null and b/out/production/TramitesAcademicos/Asignatura.class differ diff --git a/out/production/TramitesAcademicos/Carrera.class b/out/production/TramitesAcademicos/Carrera.class new file mode 100644 index 0000000..8f73de3 Binary files /dev/null and b/out/production/TramitesAcademicos/Carrera.class differ diff --git a/out/production/TramitesAcademicos/HistorialAcademico.class b/out/production/TramitesAcademicos/HistorialAcademico.class new file mode 100644 index 0000000..bbecc17 Binary files /dev/null and b/out/production/TramitesAcademicos/HistorialAcademico.class differ diff --git a/out/production/TramitesAcademicos/Profesor.class b/out/production/TramitesAcademicos/Profesor.class new file mode 100644 index 0000000..33acef7 Binary files /dev/null and b/out/production/TramitesAcademicos/Profesor.class differ diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..d060ef5 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,253 @@ +import java.util.ArrayList; +import java.util.List; + +class Alumno { + private String DNI; + private String nombre; + private String direccion; + private Carrera carrera; + private List asignaturasCursando; + private List historialAcademico; + + public Alumno(String DNI, String nombre, String direccion, Carrera carrera) { + this.DNI = DNI; + this.nombre = nombre; + this.direccion = direccion; + this.carrera = carrera; + this.asignaturasCursando = new ArrayList<>(); + this.historialAcademico = new ArrayList<>(); + } + + public String getDNI() { + return DNI; + } + + public void setDNI(String DNI) { + this.DNI = DNI; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDireccion() { + return direccion; + } + + public void setDireccion(String direccion) { + this.direccion = direccion; + } + + public Carrera getCarrera() { + return carrera; + } + + public void setCarrera(Carrera carrera) { + this.carrera = carrera; + } + + public List getAsignaturasCursando() { + return asignaturasCursando; + } + + public List getHistorialAcademico() { + return historialAcademico; + } + + public void agregarAsignaturaCursando(Asignatura asignatura) { + asignaturasCursando.add(asignatura); + } + + public void registrarHistorialAcademico(Asignatura asignatura, double nota, String examenFinal) { + HistorialAcademico historial = new HistorialAcademico(asignatura, nota, examenFinal); + historialAcademico.add(historial); + } + + public List obtenerAsignaturasAprobadas() { + List asignaturasAprobadas = new ArrayList<>(); + for (HistorialAcademico historial : historialAcademico) { + if (historial.getNota() >= 6.0) { + asignaturasAprobadas.add(historial.getAsignatura()); + } + } + return asignaturasAprobadas; + } +} + +class Carrera { + private String nombre; + private String sede; + private List asignaturas; + + public Carrera(String nombre, String sede) { + this.nombre = nombre; + this.sede = sede; + this.asignaturas = new ArrayList<>(); + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getSede() { + return sede; + } + + public void setSede(String sede) { + this.sede = sede; + } + + public List getAsignaturas() { + return asignaturas; + } + + public void agregarAsignatura(Asignatura asignatura) { + asignaturas.add(asignatura); + } +} + +class Asignatura { + private String nombre; + private int horas; + private int cuatrimestre; + private String tipo; + private Profesor profesor; + + public Asignatura(String nombre, int horas, int cuatrimestre, String tipo, Profesor profesor) { + this.nombre = nombre; + this.horas = horas; + this.cuatrimestre = cuatrimestre; + this.tipo = tipo; + this.profesor = profesor; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public int getHoras() { + return horas; + } + + public void setHoras(int horas) { + this.horas = horas; + } + + public int getCuatrimestre() { + return cuatrimestre; + } + + public void setCuatrimestre(int cuatrimestre) { + this.cuatrimestre = cuatrimestre; + } + + public String getTipo() { + return tipo; + } + + public void setTipo(String tipo) { + this.tipo = tipo; + } + + public Profesor getProfesor() { + return profesor; + } + + public void setProfesor(Profesor profesor) { + this.profesor = profesor; + } +} + +class Profesor { + private String DNI; + private String nombre; + private String direccion; + private String departamento; + + public Profesor(String DNI, String nombre, String direccion, String departamento) { + this.DNI = DNI; + this.nombre = nombre; + this.direccion = direccion; + this.departamento = departamento; + } + + public String getDNI() { + return DNI; + } + + public void setDNI(String DNI) { + this.DNI = DNI; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDireccion() { + return direccion; + } + + public void setDireccion(String direccion) { + this.direccion = direccion; + } + + public String getDepartamento() { + return departamento; + } + + public void setDepartamento(String departamento) { + this.departamento = departamento; + } +} + +class HistorialAcademico { + private Asignatura asignatura; + private double nota; + private String examenFinal; + + public HistorialAcademico(Asignatura asignatura, double nota, String examenFinal) { + this.asignatura = asignatura; + this.nota = nota; + this.examenFinal = examenFinal; + } + + public Asignatura getAsignatura() { + return asignatura; + } + + public void setAsignatura(Asignatura asignatura) { + this.asignatura = asignatura; + } + + public double getNota() { + return nota; + } + + public void setNota(double nota) { + this.nota = nota; + } + + public String getExamenFinal() { + return examenFinal; + } + + public void setExamenFinal(String examenFinal) { + this.examenFinal = examenFinal; + } +}