Advertisement
perriercamille

pairvect.java

Apr 24th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. /**
  2.  *
  3.  * @author camille
  4.  */
  5.  
  6.  
  7. public class pairvect
  8. {
  9.     private vect V1, V2;
  10.     private static int nPV;
  11.    
  12.     pairvect(int a1, int a2, int a3, int b1, int b2, int b3)
  13.     {
  14.         this.V1 = new vect(a1, a2, a3);
  15.         this.V2 = new vect(b1, b2, b3);
  16.         nPV++;
  17.     }
  18.  
  19.     pairvect(vect pV1, vect pV2)
  20.     {
  21.         this.V1 = new vect(pV1.getA(), pV1.getB(), pV1.getC());
  22.         this.V2 = new vect(pV2.getA(), pV2.getB(), pV2.getC());
  23.         nPV++;
  24.     }
  25.  
  26.     public vect getV1()
  27.     {
  28.         return this.V1;
  29.     }
  30.  
  31.     public vect getV2()
  32.     {
  33.         return this.V2;
  34.     }
  35.  
  36.     public void display()
  37.     {
  38.         System.out.println("Vecteur 3D");
  39.         V1.display();
  40.         V2.display();
  41.     }
  42.  
  43.     public static int pairVectCounter()
  44.     {
  45.         return nPV;
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement