Guest User

Untitled

a guest
Jan 6th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.18 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package practica.pkg4;
  6.  
  7. /**
  8.  *
  9.  * @author Bas
  10.  */
  11. public class Veelhoek {
  12.     int x, y, dimensie;       //declaratie
  13.     String a, b, c, d, e, f, g, h, i, j;
  14.    
  15.     public Veelhoek(){      //de constructor zonder argumenten (0,0)
  16.         this.x = 0;
  17.         this.y = 0;
  18.     }
  19.    
  20.      public void printVeelhoek(){
  21.         System.out.println("Coördinaat Veelhoek: (" + this.x + "," + this.y + ")");
  22.     }
  23.      
  24.      
  25.     public Veelhoek(int x){     //de constructor met 1 argument (d)
  26.         System.out.println("");
  27.         for(dimensie = x; dimensie <= x; dimensie++){
  28.            
  29.             if(dimensie <= 2){
  30.             System.out.println("Aantal hoeken/punten: " + dimensie + ".");
  31.             System.out.println("!! WARNING !!  Er zijn minder dan 3 hoeken/punten. Er wordt/worden een hoek(en)/punt(en) bijgemaakt.");
  32.             dimensie = 3;
  33.             }
  34.                  
  35.            
  36.             System.out.println("Aantal hoeken/punten: " + dimensie + ". Coördinaten: ");
  37.            
  38.         }
  39.     }
  40.    
  41.     public class setPunt {
  42.        
  43. }
  44. }
Add Comment
Please, Sign In to add comment