Está en la página 1de 27

Registrar las actividades realizadas en la etapa de desarrollo.

Camilo Carrasco

Taller de ingeniería de software

Instituto IACC

11/10/2021
Desarrollo

Hoja de registro de actividades

Realizado por: Camilo Carrasco

Proyecto Etapa Nombre actividad Duración Fecha

Modulo 3 programación Programación 1 día 15/10/2021

modulo 3: home

jefe proyecto

Modulo 3 Pruebas de Prueba de 2 horas 16/10/2021

sistema módulos

Modulo 3 Pruebas de Prueba de 2 horas 16/10/2021

sistema componentes

Modulo 3 Pruebas de Pruebas de 4 horas 16/10/2021

sistema integración
En este modulo numero 3 creamos la interacción que tendrá el jefe de proyecto al momento de

ingresar con sus credenciales, en este caso hemos dado dos opciones al jefe de proyecto, la de

poder crear un nuevo proyecto o abrir un proyecto ya creado.

esto lo hemos desarrollado de la siguiente manera:


Como podemos observar el modulo nos crea un archivo con los datos ingresados, en el siguiente

modulo se inmplementara la opción de poder leer este proyecto creado u otro.


CODIGO

VISTA HOME

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package vista;

import java.io.File;

import javax.swing.JFileChooser;

import static vista.inicio.frmReg;

/**

* @author camil

*/

public class home extends javax.swing.JFrame {

public static crearProyecto frmCreaPro;

public static abrirProyecto frmabrirPro;

/**

* Creates new form home


*/

public home() {

initComponents();

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

btnCrearPro = new javax.swing.JButton();

btnAbrirPro = new javax.swing.JButton();

BtnSalirHome = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

jLabel1.setText("HOME");
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

jLabel2.setText("del jefe de proyecto");

btnCrearPro.setText("Crear Proyecto");

btnCrearPro.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

btnCrearProActionPerformed(evt);

});

btnAbrirPro.setText("Abrir Proyecto");

btnAbrirPro.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

btnAbrirProActionPerformed(evt);

});

BtnSalirHome.setText("Salir");

BtnSalirHome.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

BtnSalirHomeActionPerformed(evt);

});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN

G)

.addGroup(layout.createSequentialGroup()

.addGap(214, 214, 214)

.addComponent(jLabel1))

.addGroup(layout.createSequentialGroup()

.addGap(178, 178, 178)

.addComponent(jLabel2))

.addGroup(layout.createSequentialGroup()

.addGap(64, 64, 64)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA

DING)

.addComponent(btnAbrirPro)

.addComponent(btnCrearPro))))

.addContainerGap(202, Short.MAX_VALUE))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)
.addComponent(BtnSalirHome)

.addGap(58, 58, 58))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(27, 27, 27)

.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2)

.addGap(40, 40, 40)

.addComponent(btnCrearPro)

.addGap(27, 27, 27)

.addComponent(btnAbrirPro)

.addGap(88, 88, 88)

.addComponent(BtnSalirHome)

.addContainerGap(39, Short.MAX_VALUE))

);

pack();

}// </editor-fold>

private void btnCrearProActionPerformed(java.awt.event.ActionEvent evt) {

if(frmCreaPro == null){
frmCreaPro = new crearProyecto();

frmCreaPro.setVisible(true);

private void btnAbrirProActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

JFileChooser jf = new JFileChooser();

jf.showOpenDialog(this);

File archivo = jf.getSelectedFile();

if(archivo != null ){

private void BtnSalirHomeActionPerformed(java.awt.event.ActionEvent evt) {

System.exit(0);

/**

* @param args the command line arguments

*/
public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE,

null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE,

null, ex);

} catch (IllegalAccessException ex) {


java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE,

null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE,

null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new home().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton BtnSalirHome;

private javax.swing.JButton btnAbrirPro;

private javax.swing.JButton btnCrearPro;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;


// End of variables declaration

VISTA CREARPROYECTO

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package vista;

import java.io.File;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import javax.swing.JFileChooser;

import javax.swing.JOptionPane;

/**

* @author camil

*/

public class crearProyecto extends javax.swing.JFrame {

JFileChooser seleccionar = new JFileChooser();


File archivo;

FileInputStream entrada;

FileOutputStream salida;

/**

* Creates new form crearProyecto

*/

public crearProyecto() {

initComponents();

public String AbrirArchivo (File archivo){

String documento="";

try{

entrada = new FileInputStream(archivo);

int ascci;

while ((ascci=entrada.read())!=-1){

char caracter = (char)ascci;

documento +=caracter;

}catch (Exception e){

}
return documento;

public String GuardarArchivo (File archivo, String documento){

String mensaje=null;

try{

salida = new FileOutputStream(archivo);

byte[]bytxt=documento.getBytes();

salida.write(bytxt);

mensaje = "Archivo guardado";

}catch(Exception e){

return mensaje ;

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">


private void initComponents() {

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jLabel1 = new javax.swing.JLabel();

txtnamePro = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

txtdatePro = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jCheckBox1 = new javax.swing.JCheckBox();

jCheckBox2 = new javax.swing.JCheckBox();

jCheckBox3 = new javax.swing.JCheckBox();

jCheckBox4 = new javax.swing.JCheckBox();

jLabel4 = new javax.swing.JLabel();

jTextField3 = new javax.swing.JTextField();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jMenu2 = new javax.swing.JMenu();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jButton1.setText("Guardar");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jButton1ActionPerformed(evt);

});

jButton2.setText("Salir");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel1.setText("Nombre del proyecto");

txtnamePro.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

txtnameProActionPerformed(evt);

});

jLabel2.setText("fecha inicio proyecto");

jLabel3.setText("Equipo necesario para el desarrollo");

jCheckBox1.setText("Analistas");
jCheckBox2.setText("Programadores");

jCheckBox3.setText("Usuarios finales");

jCheckBox4.setText("Base de datos");

jLabel4.setText("Fecha limite proyecto");

jMenu1.setText("File");

jMenuBar1.add(jMenu1);

jMenu2.setText("Edit");

jMenuBar1.add(jMenu2);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton1)

.addGap(18, 18, 18)

.addComponent(jButton2)

.addGap(37, 37, 37))

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN

G)

.addGroup(layout.createSequentialGroup()

.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA

DING)

.addComponent(jLabel1)

.addComponent(jLabel2)

.addComponent(jLabel4))

.addGap(43, 43, 43)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA

DING, false)

.addComponent(txtnamePro)

.addComponent(txtdatePro)

.addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 176,

Short.MAX_VALUE)))

.addGroup(layout.createSequentialGroup()

.addGap(45, 45, 45)

.addComponent(jLabel3))
.addGroup(layout.createSequentialGroup()

.addGap(186, 186, 186)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA

DING)

.addComponent(jCheckBox2)

.addComponent(jCheckBox3)

.addComponent(jCheckBox1)

.addComponent(jCheckBox4))))

.addContainerGap(170, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI

NE)

.addComponent(jLabel1)

.addComponent(txtnamePro, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI

NE)

.addComponent(jLabel2)
.addComponent(txtdatePro, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI

NE)

.addComponent(jLabel4)

.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(26, 26, 26)

.addComponent(jLabel3)

.addGap(20, 20, 20)

.addComponent(jCheckBox1)

.addGap(18, 18, 18)

.addComponent(jCheckBox2)

.addGap(18, 18, 18)

.addComponent(jCheckBox4)

.addGap(18, 18, 18)

.addComponent(jCheckBox3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88,

Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI

NE)

.addComponent(jButton2)

.addComponent(jButton1))
.addGap(27, 27, 27))

);

pack();

}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

System.exit(0);

private void txtnameProActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

if (seleccionar.showDialog(null, "Guardar")==JFileChooser.APPROVE_OPTION){

archivo = seleccionar.getSelectedFile();

if(archivo.getName().endsWith("txt")){

String Documento = txtnamePro.getText();

String mensaje = GuardarArchivo (archivo, Documento);

if(mensaje!=null){

JOptionPane.showMessageDialog(null, mensaje);

}else {
JOptionPane.showMessageDialog(null, "Archivo no compatible");

}else{

JOptionPane.showMessageDialog(null, "Guardado");

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :

javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;
}

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(crearProyecto.class.getName()).log(java.util.logging.Level.S

EVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(crearProyecto.class.getName()).log(java.util.logging.Level.S

EVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(crearProyecto.class.getName()).log(java.util.logging.Level.S

EVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(crearProyecto.class.getName()).log(java.util.logging.Level.S

EVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {


new crearProyecto().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JCheckBox jCheckBox1;

private javax.swing.JCheckBox jCheckBox2;

private javax.swing.JCheckBox jCheckBox3;

private javax.swing.JCheckBox jCheckBox4;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JTextField jTextField3;

private javax.swing.JTextField txtdatePro;

private javax.swing.JTextField txtnamePro;

// End of variables declaration

}
Bibliografía

1- Material de apoyo IACC

También podría gustarte