Error messages!  area(double, double) cannot be applied to ( )

I keep getting these error messages:
area(double,double) in Rectangle cannot be applied to ()
          return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ^
perimeter(double,double) in Rectangle cannot be applied to ()
          return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter();
^
setSides(double,double) in Rectangle cannot be applied to (double)
          R.setSides(input.nextDouble());
^
3 errors
Tool completed with exit code 1
Can anybody tell me why it is doing this? Thanks in advance!
import java.util.Scanner;
public class Rectangle
     public double length;
     public double width;
     public Rectangle()
          length = 0;
          width = 0;
     public double getSides()
          return length;
          return width;
     public void setSides(double length, double width)
          this.length = length;
          this.width = width;
     public double area(double length, double width)
          double area = length * width;
          return area;
     public double perimeter(double length, double width)
          double perimeter = (length * 2) + (width * 2);
          return perimeter;
     public String toString()
          return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter();
     public static void main(String [] args)
          Rectangle R = new Rectangle();
          Scanner input = new Scanner(System.in);
          System.out.println("Enter radius: ");
          R.setSides(input.nextDouble());
          System.out.println(R.toString());
}

Looking at your code more, it looks like what you want to do when you call area is get the area of the Rectangle based on the length and width it already has stored, not what you pass it. So if you take out the parameters like this:
public double area() {
     double area = length * width;
     return area;
}It will use the member variables length and width to calculate area.

Similar Messages

  • Not able to install Logic on mac with OSX.  10.8.2. Error message: Logic Studio.mpkg cannot be opened as the power pc programs are no longer supported. I have logic studio 8 software purchased in 2007 and upgraded with logic studio 9 (purchased in 2009)

    After an earlier attempt to move Logic from my other mac (OSX 10.6.8) with the migration assistant to my new mac with OSX 10.8.2. I've re-started the whole start up process by erasing the hard drive from the new machine and build it up from scratch. After a new "out of the box" start, I decided to install LOGIC from my disks : starting with my 2007 package Logic Studio 8 and upgrading with my Logic 9 package from 2009. When trying to start to install 2008 I got the error message : Logic Studio.mpkg cannot be opened as the power pc programs are no longer supported.
    What does this mean? HOw do I get this working under 10.8.2 as it works flawlessly under OSX 10.6.8. For sure I didn't buy a new machine to have OSX 10.8.2 but I suspect this is the roadblock to installing my logic package.
    Help!

    Mark,
    Sorry...
    I completely lost the thread (I actually got confused between you and another poster on a another forum that was asking the same basic question) and somehow ended up thinking you were trying to install on a PPC Mac
    My apologies and please ingnore those parts of my last post relating to the PPC Macs...
    You have an Intel Mac and therefore Logic Studio 2 Boxed Upgrade set should install/run on your Mac without issue. As I said earlier.. you do not need to try and install from the original Logic Studio 1 /Logic 8 Boxed set...(It won't work anyhow because you have an Intel Mac and that version had a PPC installer)  but just install from the Logic Studio 2 / Logic Pro 9 Upgrade Boxed setof DVDs instead...
    Have you tried the "Make Disk Image" solution I gave earlier? That normnally works under such circumstances as what you are describing can happen when your DVD drive cannot read the DVDs correctly... I have had this situation myself where one drive read them okay and another failed to do so for whatever reason. Making and then installing from Disk images of those exact same disks resolved the issue for me...
    You can try to reinstall directly from the DVDs of course though under some circumstances it may not allow you to reinstall Logic Pro itself if that part of the original installation attempt was successful... in which case you can also try this... (It's probably the easiest method if Logic 9 was already installed and present in your Apps Folder)
    If the Logic Pro App is in your applications folder..
    Run Software Updates to update Logic Pro to a version that will run under 10.8.2 (The initially installed version of Logic will not)
    Run Logic
    Go to the menu bar in Logic and select Logic Pro/Install Additional Content and select all content in there..
    This content is basically exactly the same as what is stored on the remaining DVDs of the boxed set so you might not need to use the rest of the DVDs to install from but download it all instead from Apple Servers...

  • In Contacts, I don't have any duplicates, but in iMessage contacts on iMac in Mountain Lion, the contacts it provides for a new message are all doubles. Why and how can I fix?  Thx.

    In Contacts, I don't have any duplicates, but in iMessage contacts on iMac in Mountain Lion, the contacts it provides for a new message are all doubles. Why and how can I fix? 
    I also notice that each contact says iCloud in it twice, but when I go to iCloud.com, there are no duplicates either. Help..

    mdd770,
    Try Contacts>Preferences...>Accounts...remove {-}/re-add {+}your iCloud account.
    If that is not successful, follow the steps listed in iCloud: Troubleshooting iCloud Contacts.

  • Can't install itunes - error message  "the folder "itunes" cannot be found

    Help. I just bought a new Iphone and can't get itunes to load. I had itunes on my computer for several years for my nano - haven't synced up in about a year. Went to open it and got the following error message
    The folder "itunes" cannot be found or created and is required. The default location for this folder is inside Mu Music folder"
    I have uninstalled everything - quicktime, apple mobile, every single file. I have rebooted, run searches to make sure there were no files at all left - did it through control panel, search etc., rebooted and downloaded it again (this make about 5 times now) and still get that same message that the folder cannot be found. Help! I just blew about $400 in the Apple store!
    Can anyone help me?

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    It sounds like your iPhoto Advanced preferences are set to not copy photos during import, i.e. a Referenced library:
    Check your Advanced preferences to see if that's the case. If it is the best solution would be to select the checkbox to copy the photos and reimport the photos from the flash drive.  Then check the new import. It it was OK you can delete the previous event with the "missing" photos.
    OT

  • I can no longer back up my iphone to my computer on selecting 'sync'. I can back up to iCloud but I get an error message telling me I cannot backup to my Mac. Can any one help? It's driving me crazy!

    I can no longer back up my iphone to my computer on selecting 'sync'. I can back up to iCloud but I get an error message telling me I cannot backup to my Mac. Can any one help? It's driving me crazy!

    Hello joelfromn. charleston,
    It seems you are unable to activate iMessage on a device with no carrier service. The following article provides information regarding activation issues:
    If you get an error when trying to activate iMessage or FaceTime - Apple Support
    Check your device settings
    Make sure that you’re connected to a cellular data or Wi-Fi network. If you're using an iPhone, you'll need SMS messaging to activate your phone number with iMessage and FaceTime. Depending on your carrier, you might be charged for this SMS.
    Go to Settings > General > Date & Time and make sure that your time zone is set up correctly.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • I am trying to upload my photos to iphoto. I keep receiving a error message that say "Iphoto cannot import your photos because there was a problem downloading an image" What do i Do?!

    I am trying to upload my photos to iphoto. I keep receiving a error message that say "Iphoto cannot import your photos because there was a problem downloading an image" What do i Do?!

    Remember: we cannot see your machine. There are 9 different versions of iPhoto and they run on 8 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS.  So to get help you need to give as much information as you can. Basic things like :
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For instance: 'iPhoto won't export' is best explained by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted?
    - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.
    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Floor Plan Manager Webdynpro Java Application : Error Message area change

    Hello Experts,
                             We have a Java Webdynpro Application inside the  ESS business package ,delivered by SAP .
    Is there anyway we can control the Error message area at the top of the Java webdynpro applications using the configuration controller without changing the source code for a particular Java webdynpro application???
    I like to bold the error messsage and change the text color in the SAP Portal.
    If not possible using the configuration controller, what are steps that we need follow to do this change.
    Any help will be appreciated.
    Thanks,
    Greetson

    This cannot be done through personalization or any configuration.
    If you want to change look and feel of error message then assuming these are personal information applications....you will be required to make changes to ess~per DC in NWDI or application specific DC in NWDI.
    Still I believe...in web dynpro java....it will not be possible to change look and feel of standard error message area

  • The Error Message 'Application descriptor file cannot be parsed' shows when compiling (Ctrl + Enter) Adobe AIR for Android applications on Flash Professional CS5.5

    The Error Message 'Application descriptor file cannot be parsed' shows when compiling (Ctrl + Enter) Adobe AIR for Android applications on Flash Professional CS5.5
    This is happening for most of the pupils and staff at our school and they are unable to complete their work.
    This also happens on a fresh copy of windows and CS5.5 without any updates and also with all latest updates.
    I have tried it on 32-bit and 64-bit CS5, Windows, Air and Java with the same error every time.
    There are a small minority of users where this works fine for them with no issue.
    I have tried re-setting user profiles.
    I have tried a local admin and domain admin account with the same issue
    I have noticed however that if the file is moved to the shared area it will compile. If it is on their documents area it will not compile. The users have full control in both locations. This is fine for staff but we are unable to give full control or modify access to the shared area for the pupil's
    I have been through the online support section and it directed me to phone Adobe Customer care who informed me that all support has been discontinued for CS5, CS5.5 and CS6 and they will only support creative cloud.
    Any ideas what to try next? There is no other information about this error and I cannot work out what is causing it.

    I have tried and  able to package an apk using your XML file.Could you please make sure your XML file starting from line 1 and coloumn 0.Any space will results in the error (Application Descriptor file cannot be parsed)
    -Pranali

  • HT4097 Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help

    Help! Everytime I try to update my iPad 2 on 4.3.3 it get is error message "The iPad "iPad" cannot be restored at this time because the iPad software update server could not be contacted or is temporarily unavailable." I dont know why please help.
    I'm running 4.3.3 on a ipad 2 im computer is connected via wire to internet

    See
    iOS 5: Updating your device to iOS 5
    http://support.apple.com/kb/HT4972
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect to your computer & click on the "Update your device using iTunes".
    Tip - You may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. After you update to iOS 5.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Error message: The selected file cannot be linked because it has 6 audio channel(s) and the clip was

    I recently purchased/upgraded from Premiere Elements 5 to Premiere Elements 9 and I cannot open the projects in version 9 that were created with version 5. It shows it as offline. I get a message to open up a file and when I do i receive the error message: The selected file cannot be linked because it has 6 audio channel(s) and the clip was created with 2 audio channels. Can someone help me or tell what I am doing wrong?  All of my projects that were completed in version 5 cannot be opened up in version 9.
    Thank you.

    Bill,
    I ran G-Spot on one of the files and here it what I have:
    DVD "VOB" format
    MPEG-2 Program Stream << { 1 vid, 1 aud }
    Sys Bitrate: 10080 kb/s VBR
    I guess I am really confused.  The project that I am trying to open PrE 9 was completed in PrE 3 w/templates , scenes, etc. The movie was burned to a DVD.  I cannot understand why I cannot open it with a newer version of PrE.  According to G-Spot (I am assuming this is what you mean above), it is already in 2 channels.  To me this should be ok.  I put many, many hours into these videos and now it seems all for not.
    Here is what I did so far:
    I uploaded the required media files to a new project in PrE9 and let them index and conform.  I saved the project with the same name in a different location.  Do I have to do this to the project files and/or the original media files?  Confusion starts here.
    The next step is where I am confused.  I do not know if I am proceeding in the right direction from here.  There is the share tab in the upper right hand corner.  Is this what you are talking about?  I am truly lost from here.
    Thanks.

  • I cannot download nor update apps through Apps Store, error message states that app cannot be downloaded, to try again later, this has been happening for the  last five days. Help!

    I cannot download nor update apps through Apps Store, error message states that app cannot be downloaded, to try again later, this has been happening for the  last five days. Help!
    It started when tryung to update Twitter. Now the problem is with every app I try to update or download.

    I have this issue as well. The App Store icon indicates there are updates available but when I open the app a popup says it can't connect to the store and the screen remains white. I have tried a hard reset (power &amp; home button) and several other suggestions I have found throughout the forums here without success.

  • Error message: (translated from Dutch) "Cannot find corresponding style page for media query"

    Error message: (translated from Dutch) "Cannot find corresponding style page for media query"(see image)
    I cannot find what is wrong with this page: steun sesem
    This message does not appear on the other pages of this site..
    What do I wrong??
    Thanks in advance!
    Martien

    There are two things that are probably causing this error.
    Line 22 in your HTML looks like this:
    </style><!--[if lt IE 9]>
    You need to remove the closing style tag:
    </style><!--[if lt IE 9]>
    Also in sesem.css, there's a missing closing brace on line 486:
    .footer {
      font-size: 1.1em;
      line-height: 1.4em;
      color: #878787;
      text-align: center;
    }  // <---- Missing closing brace
    /* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
    There are other problems in your CSS, but fixing those two items should put you back on the right track.

  • Error message area not expanded per default - but i want it expanded

    Hello,
    per default the error message area in web ui is NOT expanded. But I would like to have it expanded per default. But i cannot find the right area to change this behaviour.
    Does anyone have an idea how to change it to be expanded per default?
    Many thanks for your ideas and input.
    BR Andreas

    Thanks to your reply i found it pretty well documented in help.sap.com:
    http://help.sap.com/SCENARIOS_BUS2010/helpdata/EN/cb/659ebfc880493baad66896518a55a1/frameset.htm
    Edited by: andreas lehner on Jan 30, 2012 10:01 AM

  • The error message says that iPad cannot connect to iTunes because of a passcode, but I dont have a passcode.

    Please Help Me!!! I am really stuck.
    So I recently got an iPad 2 and everything was fine until I tried plugging it into my computer (which I didnt do when I got it). I had a passcode on it and the error message said that it cannot connect because of the passcode, so I unlocked it and hit try again and same error message. I then disabled the passcode and it still wont connect. Ive tried turning the computer off and back on, also tried turning the iPad on and back on. NOTHING IS WORKING!!! It is really frustrating because I need it for my study and it wont connect through iTunes, and because of that it wont connect to the computer at all!!! Please help me here, my partner and I are usually really good with this kind of suff and we cant work this out.. It has never happened to us before.. Please Help!!!!!

    If you cannot access the iPad because of the passcode, you have no choice but to restore it using the same steps that you would use if you forgot the passcode.
    iOS: Forgotten passcode or device disabled after entering ...

  • Although system requisites met, get error message "OS X Mavericks cannot be installed on this computer".  Any ideas?  MacBook Pro w/ Lion...

    Although system requisites met, get error message "OS X Mavericks cannot be installed on this computer".  Any ideas?  MacBook Pro w/ Lion...

    Choose About this Mac from the Apple menu, click on More Info, and check the model identifier against the following, which are the earliest Macs of each type that can run Mountain Lion and Mavericks:
    iMac7,1
    MacBook5,1
    MacBookPro3,1
    MacBookAir2,1
    Macmini3,1
    MacPro3,1
    Xserve3,1
    (108637)

Maybe you are looking for