-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodoCarrera.java
More file actions
48 lines (44 loc) · 894 Bytes
/
NodoCarrera.java
File metadata and controls
48 lines (44 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import java.io.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class NodoCarrera implements Serializable
{
private String codigo;
private String nombre;
private String unidad;
private int estudiantes;
NodoCarrera enlace;
NodoCarrera(String co, String no,String un, int est)
{
String codigo=co;
String nombre=no;
String unidad=un;
int estudiante=est;
}
String getCodigo(NodoCarrera x)
{
return x.codigo;
}
String getNombre(NodoCarrera x)
{
return x.nombre;
}
String getUnidad(NodoCarrera x)
{
return x.unidad;
}
int getEstudiantes(NodoCarrera x)
{
return x.estudiantes;
}
void SaveNodoCarrera(NodoMateria x,File f)
{
bw=new BufferedWriter(new FileWriter(f));
if(f.exists())
{
bw.write(x.codigo+"\n"+x.nombre+"\n"+x.unidad+"\n"+Integer.toString(x.estudiantes));
}
}
}