-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodoMateria.java
More file actions
54 lines (50 loc) · 1010 Bytes
/
NodoMateria.java
File metadata and controls
54 lines (50 loc) · 1010 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
49
50
51
52
53
54
import java.io.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class NodoMateria implements Serializable
{
private String codigo;
private String nombre;
private String desc;
private int cteoricos;
private int cpracticos;
NodoMateria enlace;
NodoMateria(String co, String no,String de, int ct, int cp)
{
String codigo=co;
String nombre=no;
String desc=de;
int cteoricos=ct;
int cpracticoscp;
}
String getCodigo(NodoMateria x)
{
return x.codigo;
}
String getNombre(NodoMateria x)
{
return x.nombre;
}
String getDesc(NodoMateria x)
{
return x.desc;
}
int getCT(NodoMateria x)
{
return x.cteoricos;
}
int GetCP(NodoMateria x)
{
return x.cpracticos;
}
void SaveNodoMateria(NodoMateria x,File f)
{
bw=new BufferedWriter(new FileWriter(f));
if(f.exists())
{
bw.write(x.codigo+"\n"+x.nombre+"\n"+x.desc+"\n"+Integer.toString(x.cteoricos) +"\n"+Integer.toString(x.cpracticos));
}
}
}