Correct the programme and tell me what is wrong and why

public class Vehicle
     private double maxLoad;
     public double load;
     public Vehicle()
          maxLoad=0;
     public double getLoad(double weight)
          load = weight;
          return load;
     public double getMaxLoad()
          maxLoad = +load ;
          return maxLoad;
     public static void main(String[] args) throws Exception
          Vehicle VehicleLoad = new Vehicle();
          VehicleLoad.getLoad(500);
          VehicleLoad.getMaxLoad();
          VehicleLoad.getLoad(500);
          VehicleLoad.getMaxLoad();
          VehicleLoad.getLoad(5000);
          VehicleLoad.getMaxLoad();
          VehicleLoad.getLoad(5500);
          VehicleLoad.getMaxLoad();
          System.out.println("Vehicle Load is "+VehicleLoad.getMaxLoad());
the output iam trying to get is the sum of weight .

Navy_Coder wrote:
CaptainMorgan08 wrote:
Navy_Coder wrote:
petes1234 wrote:
Your title is not a request but a demand. How do you think we'd reply? You also do pretty much a code-dump: here is my code, fix it for me. That is not how we work here.
A better way would be for you to find the errors, report the errors to us, not just dump your code, and then request that we help you with specific questions.As an interesting side note, I've come to realize after having worked with my Indian coworker, that he almost always speaks in the imperative. Nothing is ever a request, suggestion or statement; it is always an order (regardless of the fact that he is the lowest guy on the totem-pole). Everything is always, "we will", "we must", "you must", "you will", etc. Very annoying. (Even more so is the fact that he's been in the US for nearly 15 years and still speaks this way.)I have a few Indian friends, and I don't think any talk like that.Were they born (and spend 30 years) in India?No. ;-)
One was born in India, but he didn't live there long.

Similar Messages

  • Macbook Pro 2009 runs slowly and freezes. Can someone look at this Etrecheck report and tell me what's wrong?

    Macbook Pro 2009 runs slowly and freezes. Can someone look at this Etrecheck report and tell me what's wrong?
    Hardware Information:
              MacBook Pro (13-inch, Mid 2009)
              MacBook Pro - model: MacBookPro5,5
              1 2.26 GHz Intel Core 2 Duo CPU: 2 cores
              4 GB RAM
    Video Information:
              NVIDIA GeForce 9400M - VRAM: 256 MB
    System Software:
              OS X 10.9.1 (13B42) - Uptime: 6 days 16:17:8
    Disk Information:
              FUJITSU MJA2160BH FFS G1 disk0 : (160.04 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        MacBook HD (disk0s2) /: 159.18 GB (29.38 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              HL-DT-ST DVDRW  GS23N 
    USB Information:
              Apple Inc. Built-in iSight
              Apple Internal Memory Card Reader
              Apple Inc. Apple Internal Keyboard / Trackpad
              Apple Computer, Inc. IR Receiver
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
    Thunderbolt Information:
    Kernel Extensions:
              com.spsys.driver.IOKitDriver          (1.0.0d1)
              com.parallels.kext.usbconnect          (8.0 18615.948847)
              com.parallels.kext.hypervisor          (8.0 18615.948847)
              com.parallels.kext.hidhook          (8.0 18615.948847)
              com.parallels.kext.netbridge          (8.0 18615.948847)
              com.parallels.kext.vnic          (8.0 18615.948847)
              com.parallels.filesystems.prlufs          (2010.12.28)
    Startup Items:
              StartupComponent: Path: /Library/StartupItems/StartupComponent
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
              [System] com.adobe.fpsaud.plist 3rd-Party support link
              [System] com.fitbit.galileod.plist 3rd-Party support link
              [System] com.spsecure.daemon.plist 3rd-Party support link
    Launch Agents:
              [System] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
              [System] com.spsecure.useragent.plist 3rd-Party support link
    User Launch Agents:
              [not loaded] com.adobe.AAM.Updater-1.0.plist 3rd-Party support link
              [not loaded] com.adobe.ARM.[...].plist 3rd-Party support link
              [not loaded] [email protected]
              [not loaded] com.google.keystone.agent.plist 3rd-Party support link
    User Login Items:
              iTunesHelper
              AdobeResourceSynchronizer
              Dropbox
              EvernoteHelper
              Fitbit Connect Menubar Helper
              Google Chrome
    Internet Plug-ins:
              Flip4Mac WMV Plugin: Version: 2.4.4.2 3rd-Party support link
              FlashPlayer-10.6: Version: 11.9.900.170 - SDK 10.6 3rd-Party support link
              Default Browser: Version: 537 - SDK 10.9
              AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 3rd-Party support link
              AdobePDFViewer: Version: 11.0.06 - SDK 10.6 3rd-Party support link
              Flash Player: Version: 11.9.900.170 - SDK 10.6 Outdated! Update
              QuickTime Plugin: Version: 7.7.3
              OfficeLiveBrowserPlugin: Version: 12.3.6 3rd-Party support link
              AmazonMP3DownloaderPlugin101750: Version: AmazonMP3DownloaderPlugin 1.0.17 - SDK 10.4 3rd-Party support link
              Silverlight: Version: 5.1.20913.0 - SDK 10.6 3rd-Party support link
              iPhotoPhotocast: Version: 7.0
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 1.9 - SDK 10.9
              AppleAVBAudio: Version: 2.0.0 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    User Internet Plug-ins:
              Move-Media-Player: Version: npmnqmp 071503000004 3rd-Party support link
              fbplugin_1_0_3: Version: (null) 3rd-Party support link
    3rd Party Preference Panes:
              Flash Player  3rd-Party support link
              MacFUSE  3rd-Party support link
    Bad Fonts:
              None
    Old Applications:
              Microsoft AutoUpdate:          Version: 2.3.6 - SDK 10.4 3rd-Party support link
                        /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app
              /Library/Application Support/Microsoft/MERP2.0
                        Microsoft Error Reporting:          Version: 2.2.9 - SDK 10.4 3rd-Party support link
                        Microsoft Ship Asserts:          Version: 1.1.4 - SDK 10.4 3rd-Party support link
              SLLauncher:          Version: 1.0 - SDK 10.5 3rd-Party support link
                        /Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app
              Amazon MP3 Downloader:          Version: INFO_PLIST_VERSION - SDK 10.4 3rd-Party support link
    Time Machine:
              Skip System Files: NO
              Auto backup: YES
              Time Machine not configured!
    Top Processes by CPU:
                  37%          prl_vm_app
                  10%          WindowServer
                   9%          Google Chrome
                   1%          hidd
                   1%          Agent
    Top Processes by Memory:
              602 MB          prl_vm_app
              115 MB          Google Chrome
              82 MB          Google Chrome Helper
              82 MB          Mail
              70 MB          Microsoft Word
    Virtual Memory Information:
              137 MB          Free RAM
              782 MB          Active RAM
              718 MB          Inactive RAM
              1.50 GB          Wired RAM
              23.02 GB          Page-ins
              1.21 GB          Page-outs

    Hey greytdogs,
    I would give some of the suggestions in this link a shot:
    OS X Mavericks: If your Mac runs slowly
    http://support.apple.com/kb/PH13895
    Welcome to Apple Support Communities!
    Sincerely,
    Delgadoh

  • When I startup Itunes I get "An Unknown Error Occurred -42110" Message.  Can you tell me what is wrong and how to resolve?

    When I startup Itunes I get "An Unknown Error Occurred -42110" Message.  Can you tell me what is wrong and how to resolve?

    Try the following user tip:
    iTunes for Windows 11.0.2.25 and 11.0.2.26: "Unknown error -42110" messages when launching iTunes

  • My ipod had a full battery but when i took it off charge and put my earphones in it it went completley dead and hasnt come back on. Can anybody tell me what is wrong and how to fix it?

    my ipod had a full battery but when i took it off charge and put my earphones in it, it went completly dead and hasnt come back on.  Can anybody tell me what is wrong and how to fix it?

    Try here to fix it.  I doubt that you will ever find out why it did that.
    iPod touch: Hardware troubleshooting

  • My iphoto doesn't work, it just keeps loading and never works. what is wrong and how do i get it to load?

    my iphoto doesn't work, it just keeps loading and never works. what is wrong and how do i get it to load?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • My iPod touch (3rd gen) isn't putting out sound other than static and high pitched noises through the tv hookup, the built in speakers, and headphones. Can anyone tell me what's wrong and how to fix it?

    Everything on my iPod touch (3rd gen) works just fine except the audio out put.

    Try #2 and #3 in link below. If neither work, you most likely have a hardware issue. Contact Apple or a third-party service center.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • My graphics freak out! - watch a video and tell me what's wrong

    So I really don't want to cart my very heavy Mac Pro into the Apple store if I can avoid it. I especially can't afford to be w/o it if it has to be shipped away for repair.
    Here's the deal. After using Premiere Pro for varying lengths of time, my graphics go crazy. Weird geometric shapes and colors. Rather than try explain it, watch this:
    http://www.youtube.com/watch?v=z1vAh0PWD9U
    Premiere always eventually makes it happen but other things have triggered it too. Adobe tells me its not their problem. I've reinstalled Leopard (completely, reinstalled all apps and copied just a handful of library folders back). Apple has replaced my graphics card (Radeon 2600). The problem won't go away until I restart once it gets triggered, no matter what program I close or go into. And if I connect w/ Remote Desktop after its begun, the craziness shows up thru there as well.
    Does this look familiar to anyone???

    Apple doesn't even sell the Radeon 3870, it is sold by ATI as retail card and not carried by Apple or as BTO, so I think you are up the creek.
    The only "upgrade" Apple can offer other than replace the 2600 would be Nvidia 8800GT, which you probably don't want.
    So if you can't be w/o and you want a solution, sometimes, to my mind, $220 might be a good enough solution, and send in the 2600 - can't hurt to have a backup card.

  • My iPad hd keeps shutting down and the only screen available is black with the glowing apple symbol? What's wrong and how do I fix it?

    Please help!!

    If the above doesn't work:
    Try and force iPad into Recovery Mode:
    1. Turn off iPad
    2. Connect USB cable to computer; leave the other end alone
    3. Press and hold the Home button down and connect the docking end of cable to iPad
    4. Continue holding the Home button until you see the "Connect To iTune" screen
    5. Release the Home button
    6. Open iTune
    7. You should see "iTunes has detected an iPad in recovery mode"
    8. Use iTune to restore iPad
    Note: You need to be patient and repeat the above many times to recover your iPad

  • Download itunes and the setup goes fully through and then i click on the icon and nothing loads, what s wrong and how can i fix it?

    i have downloaded itunes 5 times and samething... nothing... i really wish itunes had an online tech support live chat...

    Find help from this article:
    iTunes for Windows Vista or Windows 7: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1717

  • My iPod Shuffle (4th Generation) flashes red when I put it in the USB drive. What is wrong and how do I fix it?

    Earlier today, I tried to use my shuffle, but for some reason, not only did it not play music, it gave a tri-tone. When I put it into the USB of my computer, the light flashed red for a moment then stopped. My iPod does not show up on iTunes nor My Computer. Can someone tell me what is wrong and how to fix this?

    Kathleen,
    Start with this Apple support document.
    http://support.apple.com/kb/TS1410
    B-rock

  • Can anyone read this Console log and tell me what is "librariand" ?

    I've been having "librariand" showing up every 2-3 minutes in my log. can anyone read this Console log and tell me what is "librariand" and what's the problem behind this ?
    11-08-14 9:53:37.009 AM librariand: new client - cancelling idle timeout
    11-08-14 9:53:37.010 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:53:37.010 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:53:37.010 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:53:37.010 AM librariand: no clients - starting idle timer
    11-08-14 9:53:37.011 AM librariand: new client - cancelling idle timeout
    11-08-14 9:53:37.011 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:53:37.012 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:53:37.012 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:53:37.012 AM librariand: no clients - starting idle timer
    11-08-14 9:53:37.013 AM librariand: new client - cancelling idle timeout
    11-08-14 9:53:37.014 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:53:37.014 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:53:37.015 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:53:37.015 AM librariand: no clients - starting idle timer
    11-08-14 9:53:37.015 AM librariand: new client - cancelling idle timeout
    11-08-14 9:53:37.015 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:53:37.016 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:53:37.016 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:53:37.016 AM librariand: no clients - starting idle timer
    11-08-14 9:53:37.017 AM librariand: new client - cancelling idle timeout
    11-08-14 9:53:37.017 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:53:37.017 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:53:37.018 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:53:37.019 AM librariand: no clients - starting idle timer
    11-08-14 9:56:39.802 AM librariand: new client - cancelling idle timeout
    11-08-14 9:56:39.803 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:56:39.803 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:56:39.804 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:56:39.804 AM librariand: no clients - starting idle timer
    11-08-14 9:57:11.575 AM librariand: new client - cancelling idle timeout
    11-08-14 9:57:11.576 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:57:11.576 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:57:11.577 AM librariand: no ubiquity account configured, not creating collection
    11-08-14 9:57:11.577 AM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 9:57:11.577 AM librariand: client connection is invalid: Connection invalid
    11-08-14 9:57:11.577 AM librariand: no clients - starting idle timer

    I completely uninstalled the following:
    Removed Evernote.app
    Removed User/Library/Preferences/com.evernote.Evernote.plis
    Removed User/Library/Applications Support/Evernote
    and still get to see these logs when restart:
    11-08-14 7:57:03.263 PM librariand: new client - cancelling idle timeout
    11-08-14 7:57:03.263 PM librariand: no ubiquity account configured, not creating collection
    11-08-14 7:57:03.263 PM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 7:57:03.264 PM helpd: unable to get sandbox extensions: The operation couldn’t be completed. (LibrarianErrorDomain error 10 - Unable to configure the collection.)
    11-08-14 7:57:03.265 PM librariand: no ubiquity account configured, not creating collection
    11-08-14 7:57:03.265 PM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    11-08-14 7:57:03.265 PM librariand: client connection is invalid: Connection invalid
    11-08-14 7:57:03.265 PM librariand: no clients - starting idle timer
    11-08-14 7:57:13.753 PM librariand: new client - cancelling idle timeout
    11-08-14 7:57:13.767 PM librariand: no ubiquity account configured, not creating collection
    11-08-14 7:57:13.767 PM librariand: error in handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
    any other solution ?

  • Apple wants to charge for a repair but won't tell me what's wrong with my iPad

    So my iPad mini is 1 year and 5 days old, and it suddenly won't power on.  Nothing, even with a different charger and cable.  The Apple website said to send in for battery/power issues, so I filled in the form and gave them my credit card for a little over $100.00 and sent it to them via UPS.  That was 2 days ago, now I get an email saying they need to charge me $225.95+tax and I have 48 hours to either pay it or have them send the unit back.  Nothing on their repair status tells me what is wrong and why the sudden increase in price for an iPad mini repair.  I can call or chat online for another $19.00, but that seems like hiway robbery to me.  I mean, I already paid you $100+, can't you even tell me what you found that needs another $225?!?!?  On the repair status, there is an area called views of your product with a broken image file, so I can't even see what they are referring to.
    If I way the $19, will they even be able to tell me anything, or will they just read what I can see on the webpage?  I'm starting to think it will be cheaper to just buy another iPad mini at this rate.
    Has anyone any advice ?

    Well, I called Apple and talked to them last night.  They were surprisingly very friendly.  They emailed me a picture of the iPad with what they were concerned about.  Now there is a dent in a corner, that I know wasn't there before.  I take create care of the iPad and use a full bumper case.  I explained to the repair tech that this dent is new and was not there when I took the iPad in for UPS.  Actually, when I took the iPad to UPS, I had the unit in the original box (I'm OCD that way).  The guy at UPS told me to take the iPad out of the box and then he weighed the iPad, some bubble wrap and an empty box.  He then said it was good to go and I walked away with the original packaging.  I honestly suspect the damage happened at UPS.  Plus a small dent in a corner shouldn't affect battery, right?  Anyway, after talking with a few people at repair, they noticed that their records show the iPad being 1 day out of AppleCare. 
    The last guy was going to just charge me for the battery replacement, which I am good with.  But, guess what, Apple can't partial charge, it's either all or nothing.  So, after about an hour of being on the phone, they will repair or replace the iPad at no charge to me (just this once, only). 
    I have to admit, that calling and talking with these guys was very helpful.  Everyone was friendly and cheering.  Plus I wasn't calling India (no offence to India).  I am definitely going to continue purchasing Apple products if this how their support works.  If only Cisco could learn to work that way...

  • Help....I am trying to set up iClould on my pc....the set up was complete....when I try to sign in to set up it says the Apple ID is valid but is not an iCloud account.  Please help me and tell me what I am doing wrong.

    Help....I am trying to set up iClould on my pc....the set up was complete....when I try to sign in to set up it says the Apple ID is valid but is not an iCloud account.  Please help me and tell me what I am doing wrong. Thx

    Hi DesCoop,
    You must initiallly activate iCloud from an IOS device or a Mac. You cannot inititally activated from a PC.
    Sorry.
    GB

  • Where in gods name is the homesharing button, I see a little cloud that you cannot click on and tells you what account you have but thats is. There's an option for turning on and off homesharing, but no button to access the actual library of the other PC

    Where in god’s name is the homesharing button, I see a little cloud that you cannot click on and tells you what account you have but that's it. There's an option for turning on and off homesharing, but no button to access the actual library of the other PC. On either PCs. Both are logged in and both are registered for homesharing. however because apple keeps updating and moving things around for no reason there appears to be no way of accessing the homsharing button in the latest version of itunes. the website refers to " Once set up, all the libraries from your computers you've enabled Home Sharing on will show up in the SHARED area of iTunes:" well I have searched all over in the recent itunes versions and there is no "shared area" to be found.
    Please find the attachment of a screen cap of my itunes.
    If anyone can help by telling me where it has been moved to or if it even still exists that would be much appreciated.

    Welcome to the Apple Community.

  • HT1926 hey guys,i tried to install the latest version of itunes but when i try to open it,it just comes up windows error 2 apple application support was not found,can anyone help me out and tell me what i need to do pls ?

    hey guys,i tried to install the latest version of itunes but when i try to open it,it just comes up windows error 2 apple application support was not found,can anyone help me out and tell me what i need to do pls ?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

Maybe you are looking for

  • How do I change security encryption name on WiFi network so computer will stop kicking me off Internet?

    My Internet provider, Verizon, recently had me update my router to WPA2 encryption.  It was previously WEP.  Now, each time my computer goes to sleep it drops off the Internet and when I click on the Network icon on the top menu bar it asks again whi

  • Acrobat Plug-in Variable Refresh.

    Hi, I met a problem in local variable value refresh. I developed a plug-in based on the Basic Plug-in template in Samples from Acrobat. In the function which response to the click on user menu, I defined a local variable to record a user self defined

  • Fmt tag issue

    I want to store the value of <fmt:message key='"...'/> in a variable so that i can use it as a default value of text box, which will change with different language e.g above fmt messages gives "enter text" in english then same text will be in french

  • How do I remove the question mark on my dock? When I move my cursor over it it reads "photos".

    How do I remove the question mark on my dock? When I move my cursor over it it reads "photos".

  • MacBook Pro Screen Display

    I have a big problem with my screen. Recently, I left my laptop in the car and when I came back, the sun had shifted and had heated my laptop extremely hot. I cooled it down, but when I opened it up, my screen had looked like this... http://s300.phot