Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CURSO:
PROGRAMACIN II
CATEDRTICO:
ING. JORGE ALAN CAMEY VSQUEZ
TEMA:
EJERCICIO DEL PRIMER PARCIAL
ESTUDIANTE:
ONIEL ESTUARDO CAJBN BOL
SECCIN:
A
CARN:
1690-14-17248
1. Pedido encabezado
a. Atributos:
-idPedido: tipo entero
-fecha: tipo de dato dd-mm-yy
-nit: tipo de dato string
-observacin: tipo de dato string
-fechasistema: tipo de dato dd-mm-yy
b. Metodos:
Constructor con o sin parmetros
Mtodo que permia validar que la fecha sea mayor o igual a fecha del sistema
Mtodo que permita activar o desactivar un pedido
2. Pedido Detalle
a. Atributos
-idPedido: tipo entero
-idPedidoDetalle: tipo entero
-codigoProducto: tipo entero
-cantidad: tipo decimal
-precio: tipo de decimal
-Descuento: tipo decimal
-subtotal: tipo decimal
-total: tipo de dato decimal
b. Mtodos:
Constructor con o sin parmetros
Mtodo que permita validar que si el producto tiene existencia 0 no venda
Mtodo que valide cuando la cantidad es mayor a 4 que haga un descuento del 10%
Solucin:
Detalle:
/*
* 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 pedidos;
/**
*
* @author Onielosky
*/
public class Detalle {
public Detalle()
{
blnpermiteventa = false;
}
return blnpermiteventa;
}
}
Encabezado:
/*
* 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 pedidos;
/**
*
* @author Onielosky
*/
public class Encabezado {
public Encabezado()
{
Pedidos: (Main)
/*
* 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 pedidos;
/**
*
* @author onielosky
*/
public class Pedidos {
/**
* @param args the command line arguments
*/
public static void main(string[] args) {
// TODO code application logic here
end.validarfecha(10);
if( end.validarFecha(10))
{
System.out.println(" La Fecha ingreso es mayor a la del sistema");
else
{
system.out.println("fecha correcta");
}