Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. ackage produit;
  2.  
  3. import java.util.GregorianCalendar;
  4.  
  5.  
  6. public class Produit {
  7.  
  8. private int codeUnique;
  9. private String categorie;
  10. private int periodedevalab;
  11. private double prixProduct;
  12. private GregorianCalendar dateProd;
  13. private int anne;//1,2,3
  14. private int code;
  15. private static int codeHelp=0;
  16.  
  17.  
  18.  
  19.  
  20. public int getCode() {
  21. return code;
  22. }
  23.  
  24. public void setCode(int code) {
  25. this.code = code;
  26. }
  27.  
  28. public static int getCodeHelp() {
  29. return codeHelp;
  30. }
  31.  
  32. public static void setCodeHelp(int codeHelp) {
  33. Produit.codeHelp = codeHelp;
  34. }
  35.  
  36.  
  37. public void setAnne(int anne) {
  38. this.anne = anne;
  39. }
  40.  
  41.  
  42. public Produit(){
  43.  
  44. }
  45.  
  46. public Produit (int codeUnique, String categorie ,int periodedevalab ,
  47. GregorianCalendar dateProd){
  48.  
  49.  
  50. this.codeUnique = codeUnique;
  51. this.periodedevalab = periodedevalab;
  52. this.dateProd = dateProd;
  53. this.categorie = categorie;
  54. this.prixProduct = prixProduct;
  55. }
  56.  
  57.  
  58. public int getCodeUnique(){
  59. return this.codeUnique;
  60. }
  61.  
  62. public int getPeriodedevalab(){
  63.  
  64. this.periodedevalab = periodedevalab;
  65. return 0;
  66. }
  67.  
  68. public String getCategorie(){
  69. return this.categorie;
  70. }
  71.  
  72. public GregorianCalendar getDateProd(){
  73. return this.dateProd;
  74. }
  75.  
  76. public double getPrix(){
  77. return this.prixProduct;
  78. }
  79.  
  80. void addprixProduct(double prixProduct) {
  81.  
  82. }
  83.  
  84. int getAnnee() {
  85. return 0;
  86.  
  87. }
  88.  
  89.  
  90.  
  91.  
  92. @Override
  93. public String toString(){
  94.  
  95. return "Produit:" + "Categorie:"+this.categorie+'\n'+"Code Unique:"+
  96. this.codeUnique+'\n'+"Periodedevalab"+this.periodedevalab+'\n'+"Prix"+
  97. this.prixProduct+'\n'+"Date de production"+this.dateProd;
  98.  
  99. }
  100.  
  101.  
  102.  
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement