IS THERE NOONE OUT THERE WHO CAN HELP ME?!?!?

NAME:Christopher Benson
DATE:
import java.awt.*;
public class Coordinate extends Point// implements Comparable<Coordinate>
     public Coordinate()
          super();
     public Coordinate(int diffX, int diffY)
          super(diffX, diffY);
     public Coordinate(double diffX, double diffY)
          super.setLocation(diffX, diffY);
     public Coordinate(Coordinate temp)
          super(temp);
     public String toString()
          return "(" + this.x + ", " + this.y + ")";
NAME: Christopher Benson
DATE:November 3 2006
PURPOSE:
import java.util.*;
public class Polygons extends Coordinate
     private static final double DEG_TO_RAD = Math.PI/180;
     private int numSides, sides, sideLeng;
     private double rad;
     private Coordinate cntrCoor;
     private double radius;
     private double cntrlAngl, angle;
     ArrayList <Coordinate> Cords;
     public Polygons()
          int sides = 0;
          double sideLength = 0;
          double radius = 0;
          int centerAngl = 0;
     public Polygons(int numSides)
          int sides = numSides;
          double radius = 10;
          int centerAngl = 360/sides;
     public Polygons(int numSides, double radius)
          sides = numSides;
          radius = rad;
          cntrlAngl = 360/sides;
          Cords = new ArrayList <Coordinate> (sides);
          setCoordinates(cntrlAngl);
     public Polygons(int numSides, int sideLength)
          sides = numSides;
          sideLength = sideLeng;
          radius = 10;
          cntrlAngl = 360/sides;
          Cords = new ArrayList <Coordinate> (sides);
          setCoordinates(cntrlAngl);
     private void setCoordinates(double angle)
          double tempAng = angle;
          double xCor, yCor;
          for(int I = 1; I == sides; I++)
               xCor = radius * Math.cos(tempAng * DEG_TO_RAD);
               yCor = radius * Math.sin(tempAng * DEG_TO_RAD);
               Cords.add(new Coordinate(xCor, yCor));
               tempAng += cntrlAngl;
     public ArrayList <Coordinate> getCoordinates()
          ArrayList <Coordinate> temp = new ArrayList <Coordinate> (sides);
          Iterator <Coordinate> iter = temp.iterator();
          while(iter.hasNext())
               temp.add(new Coordinate(iter.next()));
          return temp;
     public void radius(double rad)
          radius = rad;
          setCoordinates(angle);
     public void setCenter(Coordinate center, int x1, int y1)
          ArrayList <Coordinate> temp = new ArrayList <Coordinate> (sides);
          Iterator <Coordinate> iter = temp.iterator();
          while(iter.hasNext())
               iter.next().translate(x1,y1);
     public void rotate(double degree)
          setCoordinates(degree);
     public double area(double rad, double cntrlAngl)
          double area;
          double apothem = rad * Math.cos(cntrlAngl/2 * DEG_TO_RAD);
          return apothem;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class DrawCurves extends Frame
     CurvCanvas cBoard = new CurvCanvas();          // Create area/Canvas for drawings
    private ArrayList<Coordinate> drawPts;
    private boolean closedCurve;
    private int numSides;
    private String numSidesInput;
    public DrawCurves( )      // Default constructor
            setTitle("Curve Drawing");
            setSize(1600,1200);
            addWindowListener(new MyLocalWindowAdapter());
            cBoard.setSize(400,300);          // Note: size SHOULD fit in window
            cBoard.setBackground(Color.GREEN);
            add("Center",cBoard);
            getInput();
            setVisible(true);
    } // DrawCurves()
     private void getInput()
          numSidesInput = JOptionPane.showInputDialog(null, "Please input the number of sides that you would like to use for your polygon");
          numSides = Integer.parseInt(numSidesInput);
          Polygons poly = new Polygons();
          poly.Polygons(numSides, 20);
     private class MyLocalWindowAdapter extends WindowAdapter
          public void windowClosing(WindowEvent event)
               dispose();
             System.exit(0);
     } //inner class MyLocalWindowAdapter
        private class CurvCanvas extends Canvas
     // paint is the inherited method we should override in order to draw our own image in an AWT window
          public void paint(Graphics g)
               Point startPt, fromPt, toPt;
               Iterator <Coordinate> iter = drawPts.iterator();
               while(iter.hasNext())
                    fromPt = iter.next();
                    toPt = iter.next();
                    int fX = (int)fromPt.getX();
                    int fY = (int)fromPt.getY();
                    int tX = (int)toPt.getX();
                    int tY = (int)toPt.getY();
                    g.drawLine(fX, fY, tX, tY);
                    g.setColor(Color.RED);//          sets color of line to be drawn
                    g.drawLine(100, 200, 600, 700);//     draws line between two sets of coordinates.
         }//paint()
     } // class CurvCanvas
    public static void main(String[] args)
        new DrawCurves( );
}//DrawcurvesI need help getting it to allow me to draw what i have. It doesn't seem to be allowing me to use the polygons method polygons(int, int). As you can see it is already there and i have tried recompileing everything and it still gives me that same error. Maybe one of you out there can help me fix it. Thanks for the help
~Chris~

that was mean but yes a\i am sorry i multiposted b/c i thought this was more competitive for your expert opinions and advice . i realixe now that i was wrong and so i appologize. My ugency was only expressed so that if u had nothing else to do and thought that the person u were helping wasn't that interested and was buizy then it was su[posed to tell u that ur initial thought/assumption was wrong and that i would do anything u asked to get the aid u voluntarily provide so i thought it would be obvious that i was sorry because im not stupid enough to upset volunteers beccause they aren't the most dedicated when angry... well most of the time there not. So I am very sory and will do anything with in my power to help u help me ...Tahnks again for any help given.
~chris~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • HT4061 My iphone 4s remains in recovery mode permamently. Itunes wont restore it, constant messages of error 4013 keeps coming up on screen, is there any1 out there who can help before i crack up?

    My iphone 4s remains in recovery mode permamently. Itunes wont restore it, constant messages of error 4013 keeps coming up on screen, is there any1 out there who can help before i crack up?

    Hello Sean,
    It sounds like you are constantly needing to restore your phone because it keeps going into recovery mode. Usually putting a device into recovery mode and restoring it can help isolate an issue to your iPhone hardware if an issue persists afterwards. I would try manually putting it into recovery mode and restoring it 1 more time:
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    If that does not resolve it the symptoms indicate to me that it is a hardware issue causing this to happen and would seek service for it:
    iPhone Repair - Other Repairs
    https://www.apple.com/support/iphone/repair/other/
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • I am trying to install Adobe Premiere Elements 9 without success. I successfully installed Photoshop Elements 9 without a problem. The message I am getting is 'Invalid Unicode file - .\Autoplay\LangData\en_US\lang.dat'. Anyone out there who can help pleas

    I am trying to install Adobe Premiere Elements 9 without success. I successfully installed Photoshop Elements 9 without a problem. The message I am getting is 'Invalid Unicode file - .\Autoplay\LangData\en_US\lang.dat'. Anyone out there who can help please?

    click setup, not autoplay.

  • Hi anybody there who can help me ha..? My phone 5s was stolen 1 month ago..Find my phone is no a big deal, How can i know whether my phone is in use??

    Hi anybody there who can help me ha..? My phone 5s was stolen 1 month ago..Find my phone is no a big deal bcz it seems to be wiped out all data including settings. it might be in use somewhere turning new fresh Gadget.  How can i know whether my phone is in use??

    You would know for a fact if the device is in use, but if you go back to the find my iPhone app in iCloud.com, you can either select to erase it, or place it in lost mode, in which case, once the device makes a connection to the internet, it will automatically go into that mode.

  • Any Slingboxers out there who can help me?

    I have a new Slingbox Pro and it works with my network plug and play, but I can't get it configured for remote access. I have an Airport Express attached to an iMac, with a second Express acting as WDS. I plugged the SB into the WDS AE and as I said the setup worked fine. But no remote viewing. I have found lots of info on the SB board but none about this particular setup and none that has helped me make this work.
    I suspect it has something to do with port forwarding... but not sure.
    Anyone out there with experience who could lend a hand? Thanks.

    Actually, I also figured it out -- it was pretty easy.
    1) Make sure you have an Airport express (in my case, an Airport Extreme Base Station) connected to the internet.
    2) A second AX is set up as a wireless bridge (i.e, to join the existing Airport network to extend the range of the AEBS).
    3) Slingbox is connected to the ethernet port on the second AX.
    4) Run the Slingbox Setup Assistant. An IP address (10.0.1.XXX) will get assigned to the Slingbox.
    5) Using Airport Admin Utility, open up the AEBS and configure "Port Mapping" to forward public port 5001 to private port 5001 and in the space for the "private address" fill in the XXX from the IP address previously assigned to the Slingbox.
    Go somewhere outside your network to check your connection; you should be good to go. The entire process was complete in under 10 minutes.

  • Re: Password Assistant -- "The Missing Manual" references such a beast, but I cannot locate it. I have ver 10.6.8. Anyone out there who can help?

    According to The Missing Manual, Version 10.6.8 of the Mac OSX Snow Leopard system should have a password generating utility, called the "Password Assistant," which actually generates passwords for you. I've been unable to find this miraculous utility on my Mac, and seek enlightenment from the learned readers of this community. Anyone out there have some light to shine on my dark corner?

    I  think the "Password Assistant" they are specifically referring to comes up when creating or changing an Account's password.  For example, go into your System Preferences Accounts.  Select an Account.  Click the Change Password... The sheet that drops down has a little key in a box.  Click that.  And a window with the title "Password Assistant" is displayed.
    Example: Using Apple’s Password Assistant
    Note, the Password Assistant can also be brought up from Keychain Access's New Password Item... menu.  It brings up a sheet with a little key too.
    Lastly, a little google searching flushed out a little app which apparently directly uses the built in OS X Password Assistant used by Change Password and Keychain Access.  It's called, no surprise, Password Assistant and can be found here.

  • Anyone out there who can help me?

    My itune 7.2 doesn't recognize a CD after the first one was copied........In other words it still has the CD it just finished even though it's been ejected..I put in a new CD to copy and it doesn't change from the CD i just copied....What can i do?

    Are you copying CD's or importing them into iTunes to use on iPOD etc?
    iTunes isn't relly designed to make exact copies of existing CD's you'd be better off using the burning software that came with the PC/CD writer

  • Ibook on tv doesn't work anymore - anybody there who can help please???

    Hi there
    I've problems conncting my ibook to the TV. It used to work so I have the right TV Adapter (I even bought a new one cause Ithought the old one was broken).
    If I connect it to my TV the TV is not recognized.The ibook thinks there is a new VGA Monitor. So I don't have the chance to choose betweenn NTSC or PAL...all I can do is to set different resolutions but this won't help. All I can see on my TV is a splittet "jumping" black and white image of my Ibook screen.
    I found a couple of forums where people describe this kind of prob...but no one ever awnsered.
    I wonder if this is an easy to handle software prob or a hardware prob....
    For help I would be very thankful
    ibook G4 1,2 GHz   Mac OS X (10.3.9)  

    Hello external:
             This link will explain everything to you. Click on Where is Live TV software program?
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02641554&cc=us&dlc=en&lc=en&product=4002841&sub...=
    I provide media centers trouble shooting page as well in case you well need it.
    http://h10025.www1.hp.com/ewfrf/wc/searchResults?tmp_product=HP+TouchSmart+300-1050jp+Desktop+PC&pro...=
    Nothing I saw in updates relates to Live TV not opening up Media Center other then this.
    HP Link is not working correctly. What do I do?
    HP Link may not work correctly and is not supported in TouchSmart 4.
    You might to have create an icon for Media Center to work in Touchsmart software as you have to in Touchsmart  version 3 software. OK.
            You are welcome please click on Kudos if this has answered your question. Thank you for posting. frrw

  • Anybody there who can help tweak a code?

    I've constructed a GREP statement that nearly works for me. I need a kind-hearted genius to tell me where I've gone wrong. If anybody is willing, please comment and I'll post the code and an explanation. Thanks.

    You would know for a fact if the device is in use, but if you go back to the find my iPhone app in iCloud.com, you can either select to erase it, or place it in lost mode, in which case, once the device makes a connection to the internet, it will automatically go into that mode.

  • I have installed ios7 on my iPad 4. After installation it asked me pass code which I have never set. After multiple attempts it is disabled. I don't have backup on my iCloud or iTunes. Is there anyone who can help to enable it or to reverse iPad to ios6.

    I have installed ios7 on my iPad 4. After installation it asked me a pass code which I have never set. After multiple attempts it is disabled. I don't have backup on my iCloud or iTunes. Is there anyone who can help to enable it or to reverse iPad to ios6. I asked Apple store & tech said to format it but I will lose all the data..!

    Thanks for that. Much more constructive than the last comment. It's only the restriction code I can't recall, not the access passcode. So I can currently access the device, just not age restricted content. Does that's make a difference? I also wondered if anyone knew how many attempts you get to try to get it right. Now tried 21 times and so far nothing bad has happened but I am concerned I'll eventually be completely locked out of the device. That doesn't seem in the spirit of things though. Surely it's foreseeable that a child could repeatedly try to guess the code so I can't see that it would be right to lock the device down completely in that circumstance, particularly if the access code is being typed in correctly every time.
    Thanks

  • Hi are there some who can help i am trying to update my programs in app store

    hi are there some who can help i am trying to update garageband ,iphoto and iMovie on my iMac, but it´s not my apple id  it will use to the update, so i dont now the email and the  password for the email used, and i cant change it to my apple id
    my problem started after i updated to maverick
    i hope there are someone who can help ???

    hi are there some who can help i am trying to update garageband ,iphoto and iMovie on my iMac, but it´s not my apple id  it will use to the update, so i dont now the email and the  password for the email used, and i cant change it to my apple id
    my problem started after i updated to maverick
    i hope there are someone who can help ???

  • HI THERE!IS THERE ANY ONE WHO CAN HELP ME HAVING TROUBLE WITH MY IPHONE 3GS AFTER UPGRADING TO IOS5.0 IT WONT READ THE SIM AND NO SERVICE  AND IT WONT ACTIVATED.PLEASE HELP

    HI THERE IS THERE ANYONE WHO CAN HELP ME?I UPGRADE MY IPHONE 3GS TO IOS5 AND NOW IT WONT ACTIVATE AND SAYS THE SIM CARD IS NOT SUPPORTED I CHANGE FOR ANEW SIM ALREADY BUT STILL WONT ACTIVATE.PLEASE HELP

    you're responding to a post that's almost 2 months old. Time to post your own thread.

  • I have a problem, i can't change my lockscreen wallpaper after i upgrade my iphone 4s to ios 5.1.1... Is there anyone who can help me?

    I have a problem, i can't change my lockscreen wallpaper? Doesnt work...is there anyone who can help me regarding this problem? Thx

    To help, we need more detailed information.
    --What steps are you trying?
    --What does the device tell you (any pop-ups or messages)?
    --Are you able to change the Home screen wallpaper, or is that affected too?
    --Are you the phone's owner/administrator, or is this a device used for work (assigned/administered by IT staff, possible on an Exchange server)?
    --Have you jailbroken the device?

  • In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    In my dock there was this weird program called "tutorial". While throwing away this program I had to fill in my password. Afterwards I tried to change my password, but my old password doesn't work anymore. Who can help?

    What was this program for, or did you just assume it's something you shouldn't have and therefore arbitrarily decide to "throw it away"? Exactly how did you supposedly throw it away?
    If you didn't change your administrator password, there's no reason it shouldn't work now, so that suggests you did something else, or changed it and then forgot what it was.
    You can't recover that password; you can only change it. To do that, you would need to boot from your Snow Leopard DVD, choose your language, then choose Reset Password from the Utilities menu in the top menu bar.

  • HT1386 WHILE SYNCHING iPHONE 3 WITH iTUNES. MY 1700 CONTACTS VANISHED FROM iPHONE AND iTUNES. I AM RUNNING AROUND TO GET IT RESTORED. ANYONE THERE WHO COULD HELP. HOW CAN I RESTORE AND GET MY CONTACTS BACK.

    WHILE SYNCHING iPHONE 3 WITH iTUNES.
    MY 1700 CONTACTS VANISHED FROM iPHONE AND iTUNES.
    I AM RUNNING AROUND TO GET IT RESTORED. ANYONE THERE WHO COULD HELP.
    HOW CAN I RESTORE AND GET MY CONTACTS BACK.

    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem
    pinto123 wrote:
    i did every thing you said and when i went to restore this is what happened: the ipod software update server can not be contacted. make sure your network settings are correct and your network connection is active, or try again later. what do i do to restore.     i used the last way to do it the dfu

Maybe you are looking for

  • "Mac OS X cannot be installed on this computer" - retail DVD on MacBook3,1

    I've been searching, here and elsewhere, but haven't found a solution that fits my circumstances. I'm trying to re-install Leopard on a 2.2 GHz Core 2 Duo MacBook with 1 GB of RAM, after having zeroed out the hard drive using Disk Utility from the Le

  • Ses Workflow posting delayed

    Hi, sap  Workflow for Service entry sheet is triggered and the user has approved th workflow by using the decesion task , pressing Approve button the workflow log shows the time stamp as 30/04/2010 approval date But the actual release fo the service

  • Technical Advantages of using SAP

    Hi, I want to know technical advantages of using SAP in detail. I mean, why people using SAP ( technically,i mean not in terms of reducing cost, time required to implement it...), what benefits they are getting!!! Thanks in advance!!

  • EP-PSERV component fails using JSPM

    Hey guys, Maybe cuz it's time to go home but I've got this one last component to upgrade for our EP dev system to SP17. It involves the Table WCR_USERSTAT: Conversion currently not possible. Like I said, I've got all the rest of the stack deployed bu

  • Adobe Dreamweaver CS3 - Help - Test Server

    Hey, I work for my University on a "Numeracy Inititative", we use Flash Modules develped by Adobe Flash 8, and host them on a website that was developed by Dreamweaver (not sure which version). The website is located here: http://www.uoguelph.ca/nume