Program not working correctly-Help!

class Sort
     /* method takes an array of integers as an input,
     * and returns a copy with the element values sorted
     * by select method.
     int[] selectSort(int[] input)
          /*declare variables to be used in array */
          int x, y, max, temp;
          int[] select = new int[input.length];
          /*This loop reads the entire array */
          for(x = input.length - 1; x>0; x--)
               max = 0;
               /*This loop checks to see if any number is
               lower possible greatest number /
               for(y = 0; y <= x; y++)
               {//Returns number if lowest number
                    if(input[y] > input[max])
                         max = y;
                    }//end of if statement
               }//end of inner loop
               /*Switches the values */
                    temp = input[x];
                    select[x] = input[max];
                    select[max] = temp;
          }//end of outer loop
          return select;          
     } //end of selectSort()
     /* method takes an array of integers as an input,
     * and returns a copy with the element values sorted
     * by bubble method.
     int[] bubbleSort(int[] input)
          int[] bubble = new int[input.length];
          for (int x = 1; x < input.length; x++)
               for (int y = 0; y < input.length - 1; y++)
                    if (input[y] > input[y+1])
                         int temp = input[y];
                         bubble[y] = input[y+1];
                         bubble[y+1] = temp;
          return bubble;
     } //end of bubbleSort
**********************Test Class**********************
class TestSort
     public static void main(String[] args)
          /* count variable used as loop counter when
          * result table display is generated
          int count;
          /* variable for object of class Sort */
          Sort x;
          /* create object of class GroupEx2 */
          x = new Sort();
          /* create a source array of integer elements */
int[] y = new int[5];
/* assign values to array elements to be sorted     */     
          y[0] = 8;
          y[1] = 5;
          y[2] = 3;
          y[3] = 9;
          y[4] = 1;
          /* create variable for target of select sort array */
          int[] ss;
          /* create variable for target bubble sort array */
          int[] bs;
          /* call method to return an array with element values select sorted*/
          ss = x.selectSort(y);
          /* call method to return an array with element values bubble sorted*/
          bs = x.bubbleSort(y);          
          /* display original and sorted arrays in three columns*/
          System.out.print("Input Array" + "\t");
          System.out.print("Select Sort" + "\t");
          System.out.println("Bubble Sort");
          for (count = 0; count < y.length; count++)
               /* Column 1: original array */
               System.out.print("input[" + count + "] = " + y[count]);
               /* tab between columns 1 and 2 */
               System.out.print("\t");
               /* Column 2: select sorted array */
               System.out.print("select[" + count + "] = " + ss[count]);
               /* tab between columns */
               System.out.print("\t");
               /* Column 3: bubble sorted array */
               System.out.println("bubble[" + count + "] = " + bs[count]);
          } // end of display for loop
     } // end of main()
} // end of class TestSort

Thanks for the Bash! I'm surprised you had the time
for it.Go back and look at your original post. A whole bunch of code, and the only description of the problem is "not working correctly." Do you honestly think that's a reasonable way to ask for help? Do you go to the doctor and say, "I'm sick" and then just wait for him to cure you? Do you take your care to the mechanic and say only, "It's broke"?
Look, this is your problem and it's your responsibility to fix it. There are people here who are happy to help you, but it's up to you to provide a reasonable statement of what's wrong, what you've tried, what you don't understand. For instance:
Does it compile? If not, post the complete error message.
Does it run, but throw an exception? If so, post the stack trace.
Does it not throw an exception, but not behave the way you expect? Then describe the expected beavior and the observed behavior.
Do you really need to be told this stuff? It seems like common sense that when you're asking people to spend their time helping you, you should give them the information they need to be able to do so.

Similar Messages

  • Adobe Programs Not Working-Need Help

    All my Adobe programs are unresponsive in my Mac Book Pro. Every time I open a program, after it loads up it virtually freezes. Every click I do, even if its not meant to do anything brings up the rainbow wheel, meaning a big operation is being done, or its having trouble doing the operation. This makes it so nothing can be done, not even selecting a tool, or opening a new/existing file. I know the programs are not responding because in the Force Quit window it says the programs are unresponsive. At first I tried to see if Force Quitting would help, which it didn't. I would restart my computer and that wouldn't work either. I even tried uninstalling, and re-installing the programs, and still nothing. I tried going to Disk Utility to repair the disks, and permissions, and again that didn't fix anything. At the time that I tried all that I was on the trial version of the programs, very near or at the trial period being over. So I thought upgrading to a Student License would help fix this, which it also didn't. After upgrading I uninstalled and re-installed again, still nothing. I only use three programs: Photoshop, Illustrator, and Premier Pro. They all have the same problem.

    reset your preferences -
    acrobat:  http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7feb.w .html
    adobe media encoder: https://forums.adobe.com/thread/1713540
    after effects:  http://helpx.adobe.com/after-effects/using/preferences.html
    dreamweaver:  https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs6-cc.html
    flash:  http://helpx.adobe.com/flash/kb/re-create-preferences-flash-professional.html
    illustrator:  http://helpx.adobe.com/illustrator/using/setting-preferences.html
    indesign:  https://forums.adobe.com/thread/526990
    lightroom: https://helpx.adobe.com/lightroom/help/setting-preferences-lightroom.html
    muse (mac): https://forums.adobe.com/thread/1246022?tstart=0
    photoshop:  https://forums.adobe.com/thread/375776
    photoshop elements:  https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html,  http://www.photokaboom.com/photography/learn/Photoshop_Elements/troubleshooting/1_delete_p references_file.htm
    premiere elements:  https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html
    premiere pro: http://www.mediacollege.com/adobe/premiere/pro/troubleshooter/trash-preferences.html

  • SB X-fi Xtreme Audio PCI-E Not working correctly help please

    Hi i have a SB X-fi Xtreme Audio PCI-E card on my pc , i have currently installed windows 7 and for months now i am trying to make the card work .. I have a poor sound especially when there is bass, the card is not detected by windows 7, its detected as a high definition audio device , when i plug my mic is not found..and i cant use the creative applications because is says its not supported or i have no creative poroducts on my pc ... I have tried all the latest drivers and stil have the same problem.. HELP PLEASE !!

    First, uninstall all creative drivers, console, from add/remove. Restart computer install: . X-Fi Xtreme Audio Series Driver .04.0000 from creative website. 2.X-Fi Xtreme Audio Pack .03.0002 from creative website. 3. install Creative Console from here: http://forums.creative.com/t5/Sound-Blaster/PAX-Console-Launcher-V-0/td-p/549970 * PAX Console, Modded Original Console, but newer then Creative) or this creative console: CSL_PCAPP_LB_2_6_09.exe ( it creative original console) With this console you will have bass, treble, etc, BUT you need to open ConsoLCu.exe from Program Files/Creative/Console Launcher. ConsoLCu.exe have all the options you need. Creative forget about thier sound board, thier drivers, bass, treble, etc, about customers. If you install thier drivers from their website you will not have BASS, and also an crappy sound. You need to install Creative Console from google, or from http://forums.creative.com/t5/Sound-Blaster/PAX-Console-Launcher-V-0/td-p/549970 to have bass, crystalizer, etc. I also have Creative Audio PCI-e board..... crappy chipset, just like Sb Li've 24 biti PCI.

  • Spaces not working correctly, Help!

    Hi all,
    I've just changed to a new mac (not actually new, just new to me) and I'm having problems with Spaces in Snow Leopard 10.6.8.
    I've set various apps - email, web browser etc along with Adobe Creative Suite to open in various spaces so i can easily flick between each of them but for some untold reason Spaces will not keep Adobe Indesign, Illustrstor and Photoshop in Space 1, but whatever Space i'm in rather than the one they are defined to. It does work with Chrome and Outlook however but I know is this not a problem with Adobe as it worked fine on my other Mac, which is also 10.6.8.
    I have no explanantion for this and have removed preferences.plist and that didnt work.
    Any help will be really appreciated. Thanks

    Hi, good you found a temporary solution /workaround.
    Don't know if it's useful to you, but anyway:
    I've read that OSX 10.9 will contain several improvements with spaces and dual monitor setups.
    http://9to5mac.com/2013/04/29/apple-to-update-os-x-with-new-power-user-features- more-from-ios-later-this-year/
    Wether Adobe apps will work well with this new features is another question, as Adobe and Apple are not exactly best friends anymore.
    I'm not an adobe specialist, so maybe somebody else can tune in here and provide tips?

  • Why is the Up to date program not working correctly and letting me download Lion when I have a qualifying system?

    The Apple online store doesn't seem to recognize my serial number or says it is not correct?  What is going on with this???

    Well I finally figured out why my serial wasn't working. Apparently it was because my system was customised as opposed to off the rack, not sure why this should be a problem though.
    Anyway, I used the old paper and fax method and have received confirmation that it is on it's way. If you haven't received confirmation I'd recommend chasing Apple to find out where it is.

  • Diskimagemounter program not working. HELP!

    When I download a .dmg file, the image tries to mount until i get a window that pops up saying device not configured. So, I've tried opening it with diskimagemounter (the default), disk utility, and a program called Mount which was a .app file, and it still won't work. Any suggestions?

    I have the same problem since i had to install the crashed intern HD new to the Version Mac OS X 10.4.8. Trying to mount a Diskimage i get the dialog in a popup "Defect Pipe". Who can give me a short advice too?
    john_k

  • Tutorial Program not working correctly

    I've FINALLY got the program to run, from the tutorial Creating a Web Dynpro Applicaton Accessing ABAP Functions, https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/355b9c90-0201-0010-d2a8-89fece426526
    When I run the program, I get the first screen where I can enter test information "Frankfurt" and "New York", but when I hit search, the screen blinks, but I don't get the results view.  No errors are generated. 
    Does anyone have any idea what is happening?
    Here's a screenshot of what I'm seeing: http://www.adamsblueguitar.com/test/FlightListInit.jpg
    Help!  I'm so close!

    Hi,
    there might be different reasons to not displaying.
    1) might be data not available on your giving input.
    2)the function module you are using the Group is not authrised in the JCO.
    Your are asking the second one call your bapi execute method in init() method map the output into default View for thta you need to hardcode the input values.
    But you have seen there View set As per your option you can change view.
    this might helps
    Thanks
    Lohi.
    It might helps.

  • Program not working please help

    import java.util.Scanner;
    public class Addition
    public static void main( String args[] )
    Scanner input = new Scanner( System.in );
    int number1;
    int number2;
    int sum;
    System.out.print( "Enter first integer: " );
    number1 = input.nextInt();
    System.out.print( "Enter second integer: " );
    number2 = input.nextInt();
    sum = number1 + number2;
    System.out.printf( "Sum is %d\n", sum );
    I get an error in the import statement
    class java.util.scanner ot found is the message

    Scanner isn't available until 1.5. Apparently you're still on <= 1.4

  • Elements 13 crashes - Windows message - this program is not working correctly - windows will close it.

    I bought Elements 13 4 days ago through Amazon - so far it has not run for more than 5 minutes before Windows closes it down with the message - this program is not working correctly, windows will close it. I know this is not unusual but has anyone got a solution - apart from returning  it
    with a very unfavourable review? I have tried all the suggested fixes on the Adobe help site with no result.  Elements 10 runs OK on the same machine.
    Alternatively, is there any possible way to get support from Adobe?

    juliana
    Do you have any version of Premiere Elements 13 or only Photoshop Elements 13 which comes with Elements Organizer 13?
    Let us look at the following for Elements Organizer 13....
    1. Deletion of disabling the Elements Organizer 13 setting file which is named psa.prf. In Windows 7, 8, o 8.1 64 bit, it is found in the
    path
    Local Disk C
    Users
    Owner
    AppData
    Roaming
    Adobe
    Elements Organizer
    13.0
    Organizer
    and in the Organizer Folder is the psa.prf file that you delete or disable by renaming it from psa.prf to psa.prfOLD.
    2. If the above gains you successful entry into the Elements Organizer 13, then you can
    a. create a new catalog
    and/or
    b. repair or optimize the current one
    See Elements Organizer 13/File Menu/Manage Catalogs/Catalog Manager.
    3. There are times that certain formats will bring the Elements Organizer down when you try to import those formats into
    it.  But, from what you wrote, your current problems do not sound media related.
    3. At your earliest opportunity, please update Elements Organizer 13 to 13.1 using its Help Menu/Updates.
    Please review and consider and then let us know the outcome.
    Thank you.
    ATR

  • HT201320 I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    Contact the email provider and obtain the correct setup information.

  • "Help" menu in finder is not working correctly

    My "Help" menu in the finder menubar is not working correctly. If I type in a query that can't be found, instead of telling that it can't be found, underneath the search field it just displays "Searching..." indefinitely. This is no matter what application I'm in when I access the menu. I have tried the advice in http://discussions.apple.com/thread.jspa?messageID=6389569&#6389569 and that does not work. Using OS 10.5.1

    I'd like to add that when I search, it will find menu commands (highlight relevant menu commands) but not return any actual help results. To clarify, this is when searching directly from the "help" menu bar item. Searching from within the help window seems to work fine.

  • Sound in Macbook pro is not working correctly! PLEASE HELP!

    A few days ago, the sound in the build in speakers in my macbook pro (Mac OS X 10.6.8) started not working correctly, i did not hit it or anything, just closed it down when i woke up the next day, the sound was not working correctly. i know it is hard to describe what's wrong in a written forum, but the best way to describe it is this: it sounds like when you have a set of headphones plugged in, but not wearing them. the sound is weak, with no bass. when i actualy do hear the sound when wearing headphones (in my ears) the sound is fine.
    hope anyone can help.

    Intel-based Macs: Resetting the System Management Controller (SMC)
    Resetting your Mac's PRAM and NVRAM

  • I have OSX 10.7.5, my idvd is not working correctly.  Should I re-download this version again , do you think that it will help to improve the idvd operation?

    I have OSX 10.7.5 on my imac, my idvd is not working correctly.  Should I re-download this version again , do you think that it will help to improve the idvd operation?

    First, iDVD is not and never has been part of OS X. If iDVD is not working correctly, then you should investigate possible problems with that application, support files, preferences, or cache.
    Of course you can always reinstall OS X if you wish:
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Need help iPhone 5 not working correctly

    my iPhone 5 keeps pressing all the keys around the key I want it to press on the keyboard also problems using lock screen numbers have re-started and the phone just reverts to not working correctly
    also when I got this phone I did it from a back up of my old iPhone 4 but not all the songs have fully downloaded (they are there, but cannot play) when I look on iTunes it says I have no songs that arn't on my iPhone that I've bought?
    Should I take my phone back to my carrier which is 3? Or make an appointment at the Genius Bar?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).
    Backups do not contain media, all the media should be in iTunes on your computer.  Simply select the content desired to sync to the device and sync.

  • Email pushing not working correctly for office email - 3 seperate devices/carriers

    We switched email hosts several months ago and since our email pushing has not worked correctly. Our host/IT guy has been very unwilling to help me through this (I get the pleasure of being the in-house IT source)
    I personally am on AT&T have no problems with the other 3 emails I have set up on my blackberry. However I receive my work account one time a day at roughly 6:15. Another user is on Alltel and he receives spotty emails throughout the day, but his gmail account comes through instantly. The third user is on nextel and he receives his 2-3 times per day.
    I began to think this was an email host issue since the three of us are all on different carriers, until I found out a fourth user, also on nextel, receives his emails fine.
    Users 1-3 are on Outlook 07 on various versions of the Curve. We have all our messages to stay on the server.
    User 4 is on the older nextel blackberry push to talk, and is not on outlook. 
    We do not have an exchange server. Our emails were all set up through our devices.
    Any suggestions? The answers I have received through our carriers is to make sure that our messages are set to be left on the server. Everyone else at the office has given up - but for me this is the quest for the Holy Grail.......I'm determined find the answer!
    Thank you in advance for any suggestions.
    Caitlin Talbot 

    Potential solution for windows for a side-by-side install. This works for me.
    To setup a firefox install side by side so that links from external programs (like email) can open (so you don't get a "Firefox is already running but is not responding" message) do the following.
    The solution entails the use of the -no-remote switch. Don't use it for the default browser. Use it for the non default browser.
    I'll use firefox 3.6 and firefox 4.0 as examples but this should work for future versions.
    + Install firefox 3.6 and Firefox 4.0 in different directories. Eg.
    C:\Program Files\Mozilla Firefox\firefox.exe
    C:\Program Files\Mozilla Firefox 4\firefox.exe
    + Open profile manager. Start > Run : firefox.exe -ProfileManager
    + In profile manager create Two Profiles.
    firefox3.6
    firefox4
    + In profile manager select firefox 4 as your default (assuming you want to default to the latest) and tick "Don't ask at startup"
    + Create two windows shortcuts.
    * General: Mozilla Firefox 4 (default). Shortcut > Target: "C:\Program Files\Mozilla Firefox 4\firefox.exe". Shortcut > Start In: "C:\Program Files\Mozilla Firefox 4"
    * General: Mozilla Firefox 3.6. Shortcut > Target: "C:\Program Files\Mozilla Firefox\firefox.exe" -p firefox3.6 -no-remote. Shortcut > Start In: "C:\Program Files\Mozilla Firefox"
    That's it. Links from external programs should now open in your default browser.
    Further details see. [http://kb.mozillazine.org/Opening_a_new_instance_of_your_Mozilla_application_with_another_profile Opening a new instance of your Mozilla application with another profile]

Maybe you are looking for

  • Can I upgrade an E1200 router to support Mavericks?

    I have a Mac and upgraded to Mavericks.  Now when I go to Cisco Connect, I get a message that says "Unsupported Operating System   The router software supports these operating systems: Mac OS X 10.5.8 or later, 10.6.1 or later, 10.7 or later"   What

  • Is it possible to make my project exe

    dear members my project is composed of 30 fmx file in addition to 60 rdf file my question is is it possible to make my project executable package (setup file that runs under winows98 or xp) and how?

  • I am looking for a wireless adaptor for my G5. Any suggestions?

    I am looking for a wireless adaptor for my G5....any suggestions.  I am technically challenged...

  • Upgraded to Access 2007 RecordSet.EOF is broken?

    This code is never hitting my loop condition in Access 2007, It works perfectly in Access 2003. Dim aRecordSet As New ADODB.Recordset      Dim aConnection As ADODB.Connection      Dim aSQLCmd As String     aSQLCmd = "SELECT * FROM tblProducts WHERE "

  • Converting chart from Word for Mac to Pages

    In converting a two page chart from Word for Mac to Pages, only page 1 converts. But because of the way I built the chart, I can't cut and paste one page at a time from Word and then convert. Word insists on selecting both pages. Anyone have an idea