Need an ARRAY of the values for the user to see the array values

how would I display the values to the user in an array?????
for all three loans in my java code
import java.text.*;           //20 May 2008, Revision ...many
import java.io.IOException;
class memortgage     //program class name
  public static void main(String[] args) throws IOException
    double amount,moPay,totalInt,principal = 200000; //monthly payment, total interest and principal
    double rate [ ] = {.0535, .055, .0575};          //the three interest rates
    int [ ] term = {7,15,30};                        //7, 15 and 30 year term loans
    int time,ratePlace = 0,i,pmt=1,firstIterate = 0,secondIterate = 0,totalMo=0;
    char answer,test;
    boolean validChoice;
    System.in.skip(System.in.available());           //clear the stream for the next entered character
    do
      validChoice = true;
      System.out.println("What Choice would you Like\n");
      System.out.println("1-Interest rate of 5.35% for 7 years?");       //just as it reads for each to select from
      System.out.println("2-Interest rate of 5.55% for 15 years?");
      System.out.println("3-Interest rate of 5.75% for 30 years?");
      System.out.println("4-Quit");
      answer = (char)System.in.read();
      if (answer == '1')  //7 yr loan at 5.35%
        ratePlace = 0;
        firstIterate = 4;
        secondIterate = 21;
        totalMo= 84;
      else if (answer == '2') //15 yr loan at 5.55%
        ratePlace = 1;
        firstIterate = 9;      //it helps If I have the correct numbers to calcualte as in 9*20 to equal 180...that why I was off -24333.76
        secondIterate = 20;    //now it is only of -0.40 cents....DAMN ME
        totalMo = 180;
      else if (answer == '3') //30 yr loan at 5.75%
        ratePlace = 2;
        firstIterate = 15;
        secondIterate = 24;
        totalMo = 360;
      else if (answer == '4') //exit or quit
        System.exit(0);
      else
        System.in.skip(System.in.available());               //validates choice
        System.out.println("Invalid choice, try again.\n\n");
        validChoice = false;
    }while(!validChoice);  //when a valid choice is found calculate the following, ! means not, similar to if(x != 4)
    for(int x = 0; x < 25; x++)System.out.println();
    amount = (principal + (principal * rate[ratePlace] * term[ratePlace] ));
    moPay = (amount / totalMo);
    totalInt = (principal * rate[ratePlace] * term[ratePlace]);
    DecimalFormat df = new DecimalFormat("0.00");
    System.out.println("The Interest on $" + (df.format(principal) + " at " + rate[ratePlace]*100 +
    "% for a term of "+term[ratePlace]+" years is \n" +"$"+ (df.format(totalInt) +" Dollars\n")));
    System.out.println("\nThe total amount of loan plus interest is $"+(df.format(amount)+" Dollars.\n"));
    System.out.println("\nThe Payments spread over "+term[ratePlace]* 12+" months would be $"+
    (df.format (moPay) + " Dollars a month\n\n"));
    System.in.skip(System.in.available());
    System.out.println("\nWould you like to see a planned payment schedule? y for Yes, or x to Exit");
    answer = (char)System.in.read();
    if (answer == 'y')
      System.out.println((term[ratePlace]*12) + " monthly payments:");
      String monthlyPayment = df.format(moPay);
      for (int a = 1; a <= firstIterate; a++)
        System.out.println(" Payment Schedule \n\n ");
        System.out.println("Month Payment Balance\n");
        for (int b = 1; b <= secondIterate; b++)
          amount -= Double.parseDouble(monthlyPayment);
          System.out.println(""+ pmt++ +"\t"+ monthlyPayment + "\t"+df.format(amount));
        System.in.skip(System.in.available());
        System.out.println(("This Page Is Complete Press [ENTER] to Continue"));
        System.in.read();
}

skull_innocent wrote:
whooooooo...dang....just tell me nicely .
Sorry.
I thought that this question I submitted in the wrong area previously
There are better ways to correct me in my errors for posting
I am sorry.Okay, no harm done.
I hope that you understand that a major beef of contributors here is to spend time answering a question, only to later discover that somebody else has posted a similar answer in another thread. Hence the annoyance at crossposters.
In the future, if you think you've posted in the wrong forum, or if for whatever reason you decide to post in multiple forums, pick one thread as the "main" one and provide a link to it in the others.

Similar Messages

  • GLOBAL TEMPORAY TABLE  with the ability for a user to see others's entries

    I have a list of record available for many user at the same time for them to work on.
    Every one has the tendency to chosse the first record...
    I want each of the users to be able to chose a different record once the preceding record has been selected by another user.
    It would have been somthing like a GLOBAL TEMPORAY TABLE but with the ability for every user to see others records
    so I would do and anti-join...
    Does anyon have an idea on how I could implement such a behavior?

    You will not be able to use a global temporary table for such a requirement.
    It sounds like you will need a permanent table, which you will need to lock certain records (prohibiting users from taking those already in use), you can look at using the DBMS_LOCK package for this.
    That's just speculation based on what you've typed, if you provide more details you make get more specific help.

  • Revoking the access for a user based on the date specified by the certifier.

    Hi,
    Is it possible for the certifier to specify a date before he clicks on "Revoke" so that the user access is revoked on specified date in R2 PS2.
    Regards,
    Shiva

    Hi User,
    In the logical column write case when statement
    case when valueof_nqsession(ROLE)= 'Manager' and Restricted_USER='Y' then null else table_name.column_name end
    Use conditions(11g) for the same column and define if the report retrives results show the report wihotu having column if it has results show report with column
    Guided Navigation/Conditions you should use !
    http://total-bi.com/2011/01/obiee-hide-show-sections/
    Thanks,
    Saichand

  • Seeding the cache for all users

    We are facing some performance issues (even after using aggregate tables) and are looking into seeding the cache for all users so that the dashboard pops up immediately.
    So far I couldn't make it work. As Administrator I created an iBot to run a report for 1 month (dashboard has a dashboard prompt on the period) with Data Visibility set to 'Personalized (individual data visibility)' as I understood from the manual this is the way to seed the cache for all users. Now when I log on with my personal userid and set the prompt value to that specific period it is not using the cache.
    Obviously destination was set to 'Oracle BI Server Cache' and cache has been turned on.
    Does anyone have any suggestions ?

    We are facing some performance issues (even after using aggregate tables) and are looking into seeding the cache for all users so that the dashboard pops up immediately.
    So far I couldn't make it work. As Administrator I created an iBot to run a report for 1 month (dashboard has a dashboard prompt on the period) with Data Visibility set to 'Personalized (individual data visibility)' as I understood from the manual this is the way to seed the cache for all users. Now when I log on with my personal userid and set the prompt value to that specific period it is not using the cache.
    Obviously destination was set to 'Oracle BI Server Cache' and cache has been turned on.
    Does anyone have any suggestions ?

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • Hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • TS3999 Need help! I get this message; The request for account "iCloud" failed.  The server responded with "400" to operation CalDAVUpdateShareesQueuableOperation.

    Why do I get this message? It drives me crazy and I can not find any support in the support pages...
    The request for account “iCloud” failed.
    The server responded with
    “400”
    to operation CalDAVUpdateShareesQueuableOperation.

    Follow the links given in the right panel, under "More Like This", they should provide answers.

  • The sheet I am working on has lost the ability for me to scroll to the first few columns. I can't see the columns but I can cut and paste them so I know they are still there. Has this happened to others

    The sheet I am working on has lost the ability for me to scroll to the first few columns. I can't see the columns A & B but if I cut and paste the table to a new sheet, the columns I am missing will travel to the new sheet.  I have charts and other stuff related the the original table so I need to figure out why I can only see from column C  forward.  I tried to "UNHIDE" the columns but the function doesn't seem to recognise that there are columns missing. Has this happened to others and how did you fix it?

    I've seen it happen before, or at least it sounds something like what I've seen before. The table somehow gets into the margins of the page and the app doesn't know how to deal with it. Go into Print View and try moving the table away from the left side ofthe page. You might have to change content size or resize the table to get it to correct (then put you can put them back the way you like).

  • How do I install a Thunderbird add-on for all users? Putting the XPI file into Extensions folder didn't work.

    I'm trying to install Enigmail 1.8.2 for all users. I thought I read somewhere that you don't need to unpack the XPI file.
    Whilst writing this, I did some experimenting and found a solution, but it's messy (see below). Is there an easier way?
    Fresh install of Thunderbird 31.6 on Windows 7 x64. Have observed the following:
    1. If I install the extension for one user via the Add-Ons GUI (from the marketplace, not from a local file), it does work. The Appdata\Roaming\Mozilla\Extensions folder is empty. Folder {847b3a00-7ab1-11d4-8f02-006008948af5} is created in Appdata\Roaming\Thunderbird\Profiles\xxxxxxxx.default\extensions\staged\ and moved from staged to extensions when TB is restarted.
    2. If I download the XPI file from Enigmail site and copy it to Program Files(x86)\Mozilla Thunderbird\Extensions folder, then Thunderbird's Extensions screen says "You don't have any add-ons of this type installed".
    3a. If I rename the xpi to zip (e.g. enigmail-1.8.2-tb+sm.xpi.zip) then I can open it and see that the contents are similar to what was created at point (1). If I unzip the contents, then Thunderbird doesn't recognise the add-on, unless I rename the folder to the GUID above (which could be found in install.rdf or chrome.manifest, once you know what you're looking for).
    Presumably I could also have done a per-user install, copied the folder from the profile, removed the extension, then pasted the copy into the program folder. That would save looking up the GUID but is only a little less fiddly.
    3b. After renaming the folder and restarting TB, it gives me a new tab "Install Add-on" which says "Another program on your computer would like to modify Thunderbird with the following add-on: ... Location: C:\Program Files (x86)". Once I allow the add-on, it is listed in Profiles\xxxxxxxx.default\extensions.ini.
    Aside: Disabling the add-on simply removes the line from extensions.ini, so how does TB distinguish between an unapproved add-on and a disabled one? It seems to be in extensions.json.

    Is Thunderbird already installed in the computers? If so, you could download the .xpi file and drag and drop it into the extensions window (after opening that) to install it in all the computers, following which you click the Install buttons when they become enabled, and you might have to restart Tbird afterwards.

  • When I try entering a new event in iCal on my MacBook Air, I get an error message popping up on my screen that says: The request for account "iCloud" failed.  The server responded with "502" to operation CalDAVSetPropertyQueueableOperation. Help!!??

    When I try entering a new event in iCal on my MacBook Air, I get an error message popping up on my screen that says:
    The server responded with “502”
    The request for account “iCloud” failed. 
    The server responded with “502” to operation CalDAVSetPropertyQueueableOperation.
    The request for account “iCloud” failed.
    I am then given the option of staying Online or going Offline.
    Can anyone help me?
    thanks

    Hello b.krushel,
    Thank you for using Apple Support Communities
    Any number of things could cause this issue, so I would recommend this article named iCloud: Troubleshooting iCloud Calendar found here http://support.apple.com/kb/TS3999.
    These sections in particular:
    General Troubleshooting
    Make sure there are no current issues listed on the System Status that affect iCloud Calendar. The System Status is located on the iCloud Support webpage.
    Make sure you have fully enabled iCloud Calendar for the client you are using (for more setup and troubleshooting information on iOS, OS X, Windows and iCloud.com, see the additional details below).
    Check to see if the issue you are seeing is covered in iCloud Help. To search iCloud Help, visit help.apple.com/icloud.
    Check your settings and preferences as something may not be set up correctly. For example, having incorrect date and time settings can cause issues which are easily resolved by entering the appropriate settings.
    Troubleshooting Calendar on OS X Mountain Lion (iCal on OS X Lion)Note: For instructions on setting up iCloud Calendar with Calendar or iCal on your Mac, see iCloud Setup.If you are having trouble with Calendar or iCal on a Mac and you are using iCloud Calendar, try each of these steps, testing after each to see if the issue is resolved:
    Make sure you are using OS X Lion v10.7.2 or later. Click here for help verifying the version of OS X you are using.
    Make sure your computer is online. Attempt to view www.apple.com and iCloud.com. If you can't connect to the Internet, your iCloud calendars and events will not update in iCal. Click here for more information about troubleshooting your Internet connection.
    Verify that your iCloud member name is entered into the iCloud Preference pane in System Preferences. See iCloud Setup for more information about setting up iCloud on a Mac.
    Make sure you enter and update calendar information in the iCloud section of Calendar or iCal. Only calendars and events in the iCloud section of the Calendar or iCal Calendar list will be pushed to iCloud. Both Calendar and iCal for the Mac support the display of and interaction with multiple accounts and datastores, for example, iCloud, On My Mac, Exchange, Google, and so on. This makes it easy to create or modify events or calendars in a section of  Calendar or iCal that may not be updating iCloud. Learn more about moving local calendars to iCloud.
    In some cases, you may find that you have data duplicated in both the local On My Mac and the iCloud sections of Calendar or iCal. Learn more about resolving this issue.
    You can make the iCloud calendar your default calendar for all new events. In Calendar on OS X Mountain Lion, choose Calendar > Preferences > General, or in OS X Lion, choose iCal > Preferences > Generaland under the Default Calendar heading, select one of the Calendars under the iCloud heading. Close the Preferences window to save this change.
    If recent changes simply don't appear, try forcing Calendar or iCal to refresh by selecting Refresh All from theCalendar menu.
    Make sure your account was successfully created in Calendar on your Mac (or iCal). After upgrading to iCloud Calendar, you may need to quit and reopen Calendar (or iCal). To confirm your account is configured correctly in iCal:
    Open Calendar (or iCal).
    Open Calendar (or iCal) Preferences.
    Click Accounts. You should see an account with your iCloud member name entered.
    Turn iCloud Calendars off and back on
    Quit Calendar (or iCal).
    Choose Apple () menu > System Preferences > iCloud.
    Remove the checkmark in the checkbox next to Calendars.
    Close System Preferences and wait about a minute.
    Open System Preferences and choose iCloud.
    Replace the checkmark next to Calendars.
    Close System Preferences.
    Open Calendar (or iCal) and test to see if the issue has been resolved.
    Restart your computer. This may sound simple, but it does reinitialize your network and application settings and can frequently resolve issues.
    Take care,
    Sterling

  • How can i find the tablename for that  field and suggest the report logic

    Hi experts
    The concept of BOM for finished components are defined in terms of semi finished goods. Hence, routing of a component from raw materials can not be seen directly in system through standard report.
    But users need to have the details of a routing of a component from raw material in one report. To provide the details in single report, development is required.
    With this report users can see the routing from raw material till component in one single report.
    Assumption
    BOM is maintained for a component with all related semi finished components till raw material properly.
    Material Number:  MARA – MATNR   - Multiple selection option should be there (Mandatory)
    Plant: AFRU – WERKS      - Single selection parameter (Mandatory)
    If procurement type is E or X, system has to check the routing through CA03.
    If procurement type if F, leave this field as blank
    1.operator
    2.material
    3.material description
    4.workcenter
    5.vendor
    6.operation description
    7.uom
    8.qty
    9.uom
    10.setuptime
    11.processingtime
    12.deliverytime
    using cs12,cs13
      here i have seen the details of finished goods components like semifinished goods,rawmaterils,i tried se11 to find the the table for relevent field,
    i cant get, if possible to suggest me the logic and how to find the relevent table for
    that field
    Regards
    ds

    for exploding the bom if you know header material use
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
    now check PLPO & PLKO table for routing or AFVC and AFVV for routing.
    if production order created you have to check in afvc and afvv else check in plpo and plko.
    for checking with plpo and plko you have to check MAPL table.
    for bom and material link
    MAST,STPO,STKO.
    stlnr is the common field
    regards
    shiba dutta

  • The request for account "iCloud" failed.  The server responded with "400" to operation CalDAVAddSubscriptionCalendarQueueableOperation

    Does anyone know how to fix this problem?  Or even what the problem is?  I am trying to subscribe to a calendar and every time I do, it gives me this response:
    The request for account “iCloud” failed.
    The server responded with
    “400”
    to operation CalDAVAddSubscriptionCalendarQueueableOperation
    Any help would be fantastic.  This is a course calendar, and I really need it.
    Thank you!

    Keep away from iCloud and keep away from iCal. This is the most reliable solution to these 403 issues.
    The Mac cannot upload calendars and keeps popping up error messages with an insane frequency.

  • Whenever I select something, for example, I cannot see the marching ants selection until I either scroll up or down or zoom in or out. This occurs whenever I paste an image as well--nothing shows on screen until I scroll up or down or zoom in or out. Why

    Whenever I select something, for example, I cannot see the marching ants selection until I either scroll up or down or zoom in or out. This occurs whenever I paste an image as well--nothing shows on screen until I scroll up or down or zoom in or out. Why is this?

    Ap_Compsci_student_13 wrote:
    ok sorry but doesn't sscce say to post the whole code?the first S is Short, and yes, it needs to be all the code needed to illustrate the problem and let use reproduce it. If you were developing a new Web framework, your example might be short, but for a student game it's very long.

  • Can the origin for an object be always the centre of the stage?

    Hello everybody!
    I am doing a site where I've got an object bigger than the stage, that I can zoom and drag. My problem is that when I zoom the object, he uses an origin which is on the same object. What i need is that the origin of the object will be always the centre of the stage. The aim is to drag the object and zoom in right where I am, as happens for examle in a Cad.
    So, can the origin for an object be always the centre of the stage?

    Could you try this
    sym.$('yourelement').css('background-origin','#Stage');
    Not sure though.

  • Add the option for a close button on the Scattered setting .

    Add the option for a close button on the Scattered setting ... like you have with all the other options - needed for touch devices as the roll out is no use on an ipad or iphone etc etc....

    This was the original code I got:
    Main FLA: (on AS layer inside DropDownButton Movie Object)
    function removeF() {
    removeChild(myLoader);
    var myLoader:Loader=new Loader ();
    page1_mc.addEventListener(MouseEvent.CLICK, page1content);
    function page1content(myevent:MouseEvent):void {
    var myURL:URLRequest=new URLRequest("page1.swf");
    myLoader.load(myURL);
    addChild(myLoader);
    EXTERNAL FLA: (on main time line of this file)
    close_mc.addEventListener(MouseEvent.CLICK, closeMC);
    function closeMC(myevent:MouseEvent):void {
    MovieClip(parent.parent).removeF();
    Main.FLA
    myLoader=bigboreLoader (my new loader)
    page1_mc=btnbb2 (the button who event will call external swf)
    page1content = bigborecontent (name given to SWF being loaded???)
    myURL=bigboreRequest (my new URLrequest for bigbore)
    page1.swf=moduletemplate.swf (actual address of what I am loading)
    External.FLA
    close_mc=button that will close external swf
    closeMC=movie clip to close?

Maybe you are looking for

  • Compatibility issue with itunes 10.6 and windows 7

    I just installed the update to itunes 10.6 on windows 7 64bit, and it says that it is not compatible with my theme (so it switches it back to the windows 7 basic) I normally wouldn't mind however my screen blacks out and it's really annoying. I don't

  • Will there be an update in Pages for ipad that will allow for sub scripts and superscripts

    I am a chemistry professor who loves to work on the ipad. The problem I have is that the mathematics I use and chemical equations is use in my writings need both super scripts and subscripts. I would love to use my ipad for this, but presently, the o

  • Camera is not working in Macbook Air (Last version...

    Hi everybody! I am having some problems with skype (6.1 and Mac OS X (10.9.3).  My camera isn't working anymore. In preferences section, it is not recognized (it is an isight integrated camera). In addition, now all my contacts are only "nicknames" w

  • IMessage and Personal Hotspot not working

    I'm having a weird issue with my iMessage only working over wifi. When I'm on 3G I'm not a able to send or receive iMessages. My personal hotspot settings is no where on my phone. I've tried looking under network settings and even resetting the netwo

  • Cannot open attachments Have compacted & rebuilt all .msf SOLVED caused by Zindus

    TB 25.5 on Windows 7 profile is 12.5 G going back to 2002. Don't go back often, but.... When I click on any attachment a small widow pops up for maybe 1 tenth of a second or less, and disappears. Can't read anything on it. Compacted, backed up, delet