Abstract Data Type Garis C Source Code Ver. 2.0


  1. #include "stdio.h"
  2. //#include "BOOLEAN.H"
  3. #include "math.h"
  4. #include "GARIS.H"
  5. #include "ADTPOINT.h"
  6.  
  7. void makegaris(point p1,point p2,garis *l)
  8. {
  9.       l->paw=p1;
  10.       l->pakh=p2;
  11. }
  12.  
  13. point getpaw (garis l)
  14. {
  15.       return l.paw;
  16. }
  17.  
  18. point getpakh(garis l)
  19. {
  20.       return l.pakh;
  21. }
  22.  
  23. void bacagaris(point p1,point p2,garis *l)
  24. {
  25.      makegaris(p1,p2, l);
  26. }
  27.  
  28. void tulisgaris(garis l)
  29. {
  30.      printf("(("); tulispoint(l.paw);printf(")"); printf("(");tulispoint(l.pakh);printf("))");    
  31.      
  32. }
  33.  

Coding sampai disini, sebenarnya saya lebih ke “Open Source” tapi untuk perkuliahan ini mungkin lebih baik untuk menerapkan “Closed Source” dilengkapi dengan huruf c yang menghadap ke kanan, alias copyright.

PS : email di sini untuk source codenya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s