PBKK - EAS Contribution Based Evaluation

Image
Pendahuluan Puji syukur kehadirat Tuhan YME yang selalu memberi kami dorongan untuk bekerja ikhlas dan selalu bersemangat dalam belajar, belajar dan belajar. Karya ini kami persembahkan di masa pandemi. Semoga dapat memudahkan khalayak ramai dalam memberikan bantuan dan info seputar COVID-19. Sekian dan terimakasih Kelompok SIP Darfi Sultoni 05111740000063 Bima Satria Ramadhan 05111740000081 Yudhistiro Adi Nugroho 05111740000165 Kevin Ashil Faadilah 05111740000178 Web CodeIgniter Site :  http://fp-pbkk.notlusss.xyz/ Source :  https://github.com/maybefunny/fp-pbkk Link Youtube :  https://youtu.be/6yzQWtwJetM Deskripsi Aplikasi Web ini bernama SIP atau Sistem Informasi Pandemi dimana web ini berfungsi untuk memberi tahu kepada masyarakat umum keperluan apa saja yang dibutuhkan pada masa pandemi seperti ini dan web ini juga menyediakan fitur untuk donasi. Pada tampilan ini memiliki beberapa fitur, di antaranya :  Home / Landing P...

Tugas PBO-2

MyMain
 public class MyMain  
 {  
   public static void main()  
   {  
   circle acircle; // creating reference  
   acircle = new circle(); // creating object  
   acircle.x = 10; // assigning value to data field  
   acircle.y = 20;  
   acircle.r = 5;  
   double area = acircle.area(); // invoking method  
   double circumf = acircle.circumference();  
   System.out.println("--Circle--");  
   System.out.println("Radius="+acircle.r+"Area="+area);  
   System.out.println("Radius="+acircle.r+" Circumference ="+circumf);  
   square asquare; // creating reference  
   asquare = new square(); // creating object  
   asquare.s = 20; // assigning value to data field  
   double luas = asquare.area(); // invoking method  
   double keliling = asquare.circumference();  
   System.out.println("--Square--");  
   System.out.println("Sisi="+asquare.s+"Area="+luas);  
   System.out.println("Sisi="+asquare.s+" Circumference ="+keliling);  
   rectangle arectangle; // creating reference  
   arectangle = new rectangle(); // creating object  
   arectangle.p = 20; // assigning value to data field  
   arectangle.l = 10;  
   double Luas = arectangle.area(); // invoking method  
   double Keliling = arectangle.circumference();  
   System.out.println("--Rectangle--");  
   System.out.println("Area="+luas);  
   System.out.println("Circumference ="+keliling);  
   triangle atriangle; // creating reference  
   atriangle = new triangle(); // creating object  
   atriangle.a = 20; // assigning value to data field  
   atriangle.b = 20;  
   atriangle.c = 20;  
   double Area = atriangle.area(); // invoking method  
   double Circumference = atriangle.circumference();  
   System.out.println("--Triangle--");  
   System.out.println("Area="+Area);  
   System.out.println("Circumference ="+Circumference);  
   belahketupat abelahketupat; // creating reference  
   abelahketupat = new belahketupat(); // creating object  
   abelahketupat.d1 = 20; // assigning value to data field  
   abelahketupat.d2 = 20;  
   Area = abelahketupat.area(); // invoking method  
   Circumference = abelahketupat.circumference();  
   System.out.println("--Belah Ketupat--");  
   System.out.println("Area="+Area);  
   System.out.println("Circumference ="+Circumference);  
   jajargenjang ajajargenjang; // creating reference  
   ajajargenjang = new jajargenjang(); // creating object  
   ajajargenjang.a = 20; // assigning value to data field  
   ajajargenjang.b = 40;  
   ajajargenjang.t = 50;  
   Area = ajajargenjang.area(); // invoking method  
   Circumference = ajajargenjang.circumference();  
   System.out.println("--Jajaran Genjang--");  
   System.out.println("Area="+Area);  
   System.out.println("Circumference ="+Circumference);  
   }  
 }  

Circle
 /**  
  * Write a description of class circle here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class circle  
 {  
   public double x,y; // centre coordinate  
   public double r ; // radius of the circle  
   //Methods to return circumference and area   
   public double circumference(){  
         return 2*3.14*r;  
   }  
   public double area(){  
         return 3.14*r*r;  
   }  
 }  

Square
 /**  
  * Write a description of class segitiga here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class square  
 {  
   public double s;  
   public double circumference(){  
     return 4*s;  
   }  
   public double area(){  
     return s*s;  
   }  
 }  

Rectangle
 /**  
  * Write a description of class segitiga here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class square  
 {  
   public double s;  
   public double circumference(){  
     return 4*s;  
   }  
   public double area(){  
     return s*s;  
   }  
 }  

Triangle
 /**  
  * Write a description of class triangle here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class triangle  
 {  
   public double a,b,c,d;  
   public double circumference(){  
     return a+b+c;  
   }  
   public double d(){  
     return circumference()/2;  
   }  
   public double area(){  
     return Math.sqrt(d()*(d()-a)*(d()-b)*(d()-c));  
   }  
 }  

Belah Ketupat
 /**  
  * Write a description of class belahketupat here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class belahketupat  
 {  
   public double d1,d2;  
   public double s(){  
     return Math.sqrt((d1/2)*(d1/2) + (d2/2)*(d2/2));  
   }  
   public double circumference(){  
     return 4*s();  
   }  
   public double area(){  
     return 0.5*d1*d2;  
   }   
 }  

Jajar Genjang
 /**  
  * Write a description of class belahketupat here.  
  *  
  * @author (your name)  
  * @version (a version number or a date)  
  */  
 public class belahketupat  
 {  
   public double d1,d2;  
   public double s(){  
     return Math.sqrt((d1/2)*(d1/2) + (d2/2)*(d2/2));  
   }  
   public double circumference(){  
     return 4*s();  
   }  
   public double area(){  
     return 0.5*d1*d2;  
   }   
 }  

Gambar

Comments

Popular posts from this blog

Analisa Sistem Informasi Tokopedia

UTS PBO A - Sistem Parkir Elektronik

Tugas PBKK - Framework