BossXIII   (109 views)

What is BossXIII doing now?

Java Assignment#6 Section2 already upload on journal / Choice:5-8 Purse แยกเป็น 5 ส่วน / Choice:9 Polygon แยกเป็น 2ส่วน
More than 1 month ago  ·  Comment »

Age

23

Location

bangkok, Thailand

Birthday

July 25

Looking To

Make friends
 
Advertisement

Info

http://bossxiii.hi5.com - Send it to your friends

Age

23

Birthday

July 25

Location

bangkok, Thailand

Looking To

Make friends

Languages

English, Japanese, Thai
 

About Me

I am the bone of all animes.
Moe is my body,and Ero is my blood.
I have read over a thousand mangas.
Unware of tsudere.
Nor afraid to yandere.
Have withstood H ti create many Services.
Yet, those layer will never do any thing.
So as I pray, Unlimitted Anime Works!

Interests

All Animation

Favorite Movies

-Touhou
 

Favorite Books

C programming
Java progrmaming
Fundametal of Animation
Data Structor
Ai
 

hi5 Games

Play hi5 Games

Recently played


 

Journal

View All 35 Entries    Add Comment

import java.util.*;
public class polygonrunner
{
    public static void main(String[] args)
    {
        //Creater an object and array
        Scanner in = new Scanner(System.in);
        polygon PolygonW = new polygon();
        ArrayList<Double> PolygonX = new ArrayList<Double>();
        ArrayList<Double> PolygonY = new ArrayList<Double>();
        double[] PolygonZ = new double[2];     
        int count=0,check=0;
        //get Value
        do
        {
            System.out.print("Enter the position X : ");
            PolygonX.add(in.nextDouble());
            System.out.print("Enter the position Y : ");
            PolygonY.add(in.nextDouble());
            count++;
            if(count==3)System.out.print("Thisis become a triangle.\n");
            else if(count==4)System.out.print("Thisis become a rectangle.\n");
            else if(count>=5)
            {
                System.out.print("Do you want to add more point (1=Y,2=N): ");
                check=in.nextInt();
            }
        }while(check!=2);
        int i,j,k;
        i=PolygonX.size();
        j=PolygonY.size();
        //process Parimeter
        for(k=0;k<i-1;k++)
        {
            PolygonZ[0]=PolygonW.perimeter(PolygonX.get(k),PolygonX.get(k+1),PolygonY.get(k+1),PolygonY.get(k+1));
        }
        //process Area
        for(k=0;k<i;k++)
        {    
            PolygonZ[1]=PolygonW.area(PolygonX.get(k),PolygonY.get(k+1),k,i);
            if(k+1>j-1)
            {
                PolygonZ[1]=PolygonW.area(PolygonX.get(k),PolygonY.get(0),k,i);
            }
             System.out.println("Parimetr of this Shape"+PolygonZ[0]);
             System.out.println("Area of this Shape"+PolygonZ[1]);
        }  
    }
}

////////////////////////////

เซฟชื่อ polygonrunner.java

คอมไฟล์แล้วรันได้เลย

 ///////////////////////////

 

Applications

Browse Applications

Gomoku
Classic Gomoku game (variant of Tic-Tac-Toe). You need to put five your pieces in a row to win.

BuddyPoke!
BuddyPoke your friends with super cool, personalized 3D avatars!

Rockyou Pets
Adopt a pet! Pet it, take care of it, pimp it out with all sorts of cute and cool accessories.

 

hi5 Gifts

Give a Gift    Get hi5 Coins    View all    Wishlist

  • Flaming Yin Yang
  • BossXIII doesn’t have any wishlist items

BossXIII has no unwrapped gifts.
 

Fives

Give' em Five

Comments   |   View All Entries   |   Send a Blast Card

Leave a comment for BossXIII

Aug 5, 2009 6:05 AM
 
ดี ค ร๊ า บ ผ ม ม ะ เ ม้ น ล ะ น ะ ยั ง ไ ง คื น นี้ ก้ อ ฝั น ดี น ะ ค ร๊ า บ บ ะ บุ ย ค ร๊ า บ
 
Mar 12, 2009 11:16 PM
 
ก้อขี้เกียจเล่นนินา



555
 
Mar 8, 2009 11:10 AM
 
บอสปิดเทอมยังจ๊ะนี่?

ได้เรยๆ

ไว้เจอกันในเอ็มนะ

สำหรับคืนนี้ ฝันดีจ้า :)
 
Mar 4, 2009 8:39 AM
 
บอสกะลังอยู่ในช่วงสอบชะมะ

สู้ๆๆๆ นะ

GET A ทุกตัวเรย

แล้วเจอกันจ้า

GOOD NIGHT ~
 
Feb 24, 2009 3:44 AM
 
สายัญซาหวัดครับ ^_^ เฟรน
 
Feb 16, 2009 4:22 AM
 
ช่ายๆ

จาสอบแล้ว

แต่เรายังไม่ได้แตะหนังสือเรยอ่า

-_-"
 
Feb 15, 2009 2:14 AM
 
คิดถึงจางเรย

เดี๋ยวนี้ไม่ค่อยเจอบอสหน้าหอ11

เนื่องจากเราตื่นสายนั่นเอง -_-"
 
Jan 9, 2009 8:23 AM
 
บอสซู่

ตกลงจามเราได้ยาง อิอิ

แล้วเปงงายบ้างอ่า งานวันนี้

คิดถึง G.21 มั่ก ๆ ^^
 
Jan 8, 2009 7:35 AM
 
Hello !!

สวัสดี

ถ้าเจอแล้วจาทักทายน๊า

แล้วเจอกานนน

Good Night ล่วงหน้าจ้า

อิอิ
 
 
 
Dec 8, 2008 5:05 AM
 
หวัดดีจ้ะ บอสสส
 
Nov 26, 2008 8:23 AM
 
ล.ลุง





จาว่ายากมาก
สอนหน่อยๆ
หะหะหะ



=)
 
Nov 26, 2008 5:23 AM
 
ทามงานไม่ทัน ขอเอาข้อ 5-7 ไปนะ

ปล.เราจะดรอป Physic II นะ จะเอาไปลงเรียนตอน Summer
 
Nov 23, 2008 4:45 AM
 
แว่ะมาเม้นทักทายคร่า

ปายแร่ะ

หุหุ
 
Nov 22, 2008 8:59 PM
 
^_______________^


ที่นั้นเรียนหนักป่ะ สู้ สู้น้า


อิอิ
 
Nov 20, 2008 1:17 AM
 
แค่ใกล้น่า

แต่ยางมะช่ายยยตอนนี้ (>. <)~

ยังเปนศิษย์ ปัจจุบันอยู่นะ
 
Nov 19, 2008 6:31 AM
 
ยางนึกมิออกเลยอ่ะ~

(>. <)~
 
Nov 19, 2008 3:17 AM
 
แวะมาทักทาย ^^

Thx ที่รับแอดนะ
 
Nov 18, 2008 4:55 PM
 
เราลืมบอกว่า เราไป Ment ลงการบ้านข้อ 1 ไว้นะ อย่าลืมไปอ่านล่ะ

Title
body
 

Purchase additional coins

You need an additional: hi5 Coins hi5 Coins

Get Coins No Thanks