Thursday, February 17, 2011

La Braga Metalica Trailer

JavaDoc (WORKSHOP)

Aquí está la representación de la documentación de la Clase Producto de mi programa.

Como lo mencione en entradas pasadas, modificaría considerablemente el diseño de mi código y adjunto aquí algo de mi avance:


 /** 
*This class will control all the atributes of the products that the system is going to
administer.
*/
public class Producto {



String nombre; // name of product (this is only for tests)
int numProducto; // id of the product
float precio; // cost
int numEscoba; / / Indicator of avalability for this product
numTrapeador int / / indicator of avalibity for this product


Product (String name, int price) {this.name = name
/ / this is for tests
this.precio = price;}




asignarExistencia void (int e) {

existence = e;}



Mop Mop Mop = new ("Mop", 16); / / part of the tests
trapeador.asignarExistencia ( 100);

new broom broom broom = ("Clean Sweep", 15);
escoba.asignarExistencia (100);
add
Tests MAIN function





/ ** This will toString returns a representation of the data of the products.
* /
public String toString () {return
"employee No." + partNum + "Name:" + name + / / part of the tests
"Salary:" + price;}



/ ** This method check the Availability of the products return true if
There exists enough products out or form a false return
If There Are Not any more products.
* / protected boolean


availability (String product) {
if ((product == "mop") & & numTrapeador! = 0) {
return true;}


else if ((product == "broom") & & numTrapeador! = 0) {
return true;}


else {return false;

/ * System.out. println ("No" + product + "s available

");*/
}}}







The compilation and generation of JavaDoc of the class:


Y here the final outcome of the class documentation:


And the details of the methods contained in the class so far.



Greetings! = D

0 comments:

Post a Comment