Need help with assignment......due 10/13/06....PLEASE HELP!!

Hi everyone,
I'm new to this forum, but I wanted to check here for help first...I have the following assignment:
Implement a method that will compute the present value of a stream of future payments that leaves a final balance. The parameters to the method will be the monthly payment, the annual interest rate, the number of months, and the final balance.
You can compute this by working backwards from the final balance. Given the balance at the end of the month, add the payment and divide by (1 + monthly-rate). This will give the balance at the beginning of the month. Do this as many times as months. The resulting balance is the present value.
This should also be tested. Do this by picking some values for the present value and using your function. Then, use the method from class to take the present value, the interest rate, the monthly payments and the number of months and compute the final balance. This should match the chosen value. Repeat this for several values of the parameters that you choose.
I was able to use the method from class to compute the final balance, but I'm confused as to how to work it backwards. Here's my code so far...
* TestPresentValue.java
* Created on October 5, 2006, 3:45 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package testpresentvaluejava;
* @author Administrator
public class TestPresentValue {
    /** Creates a new instance of TestPresentValue */
    public TestPresentValue() {
     * @param args the command line arguments
    public static void main(String[] args) {
        // Enter the loan parameters to compute the final balance
        double START_BALANCE = 13969;
        double ANNUAL_RATE = .08;
        double MONTHLY_PAYMENT = 200;
        int NUMBER_OF_MONTHS = 10;
        double present_value = START_BALANCE;
        for( int month = 1; month <= NUMBER_OF_MONTHS; month ++ ){
            System.out.println("Month #" + month);
            double interest = present_value * ANNUAL_RATE / 12;
            present_value = present_value + interest - MONTHLY_PAYMENT;
            System.out.println(  "    interest:   " + interest);
            System.out.print("    new balance: " + present_value);
}Can someone please help me to understand what I need to do here? Thank you to anyone who's able to help.

Implement a method....
This mean write a NEW method, don't shove everything into the main method. All those other things it mentions in the assignment should be passed in as parameters.

Similar Messages

  • I need help with Importing songs into Creative organizer please help!

    OK now i have a bunch of music files in my documents that all have MPEG4 with the itunes music symbol next to them. My problem is when i try to add them to my Windows media player nothing happens also when i search for the files in the Creative Import Wizard nothing shows up! Do i first need to put all the music i want on my ZVM im Windows Media Player first then add it's or is it something else? do i need to get rid of itunes entirely and just have the music files in my documents? Im really really confused please help!!!!!! Also No tracks show up when i try to add them to Windows Media Player or Creative MediaSource5 even though when i know i put them there
    P.S. What do u guys do ( I mean people with Zen Vison M's) Any know of any guides too? that would be great!Message Edited by Chrismic3 on 03-9-200705:54 PM
    Message Edited by Chrismic3 on 03-9-200706:00 PM

    bump

  • I need help with my Zen Vision M.. PLEASE HELP

    Hey, I'm having sooo much trouble with my Zen Vision M... so i was wondering if anyone could help me out.. i hav a couple of ?s that i desperately need answered. . All of my album art is the same and its driving me crazy. How do i change the album art?2. Is the battery in the Vision M removable?3. Can Zen Vision M shuffle songs?4. I used to have an Ipod.. i was wondering if?i could directly transfer songs from itunes to Zen MediaSource?~~~~~~~~~?Any help will be really helpful! Especially if?someone can help me with the album art!! THANKS GUYS!!

    . All of my album art is the same and its driving me crazy. How do i change the album art???Not an easy answer for this one without knowing more about how you are setting the album art.
    There are two types of album art embedding.
    One is where the album art is embedded directly in the tags of every Mp3 file. (a bit waste of space)? The second option (which is the more common method) is where each file has embeded information pointing to an external image for the album art. This is more efficient on space, and is often the one that end up with people having the same art on every song.
    Usually what happens is people put the songs in a common directory and not in subdirectories such as Artist/Album/mysong.mp3. With all the files in one flat directory often the album art (depending on software) gets saved with the same filename such at album.jpg.
    And he album.jpg file gets overwritten, and since all the songs think "their" album art is in the album.jpg file they all end up with the same art being displayed.
    Easiest solution is to copy the files into folders to organize them by album, and then reapply the album art.
    Since doing that on my ZVM I haven't had any problems with art getting lost or duplicated in ways I did not want. ?2. Is the battery in the Vision M removable???Unfortunatly it isn't.
    ?3. Can Zen Vision M shuffle songs???There are several random play options for music.
    In my opinion doesn't really feal that "random" though. 4. I used to have an Ipod.. i was wondering if?i could directly transfer songs from itunes to Zen MediaSource??You will need to export them to MP3 from itunes. Checkout the Creative KB on how to do it. Its solution ID 4653.
    ( tried pasting the URL in here but its so large, go to the knowledge base and search for "SID4653" )Message Edited by gmandual on 2-23-20060:0 PM

  • Help with Acer Aspire 4339 update. PLEASE HELP.

    Okay, I'm already sick and tired of Acer. Since my warrenty is expired, I had to deal with terrible scam site called answersby.com that Acer RECOMMENDED. I cannot believe that they would actually share this TERRIBLE website to their customers. First of all, the live chat service only directed me to the same technician that would'nt reply to ANYTHING that I said. Not only that, the website itself is buggy and whenever when you try to send feedback, you'd have to click it like 6 times in order for it to send. Ha, and get this! There's many many people telling how that website scams people entirely.  Anyways, diving into the CORE of my situation is that recently, I tried playing Sims 3, on this terrible laptop, and my drivers are outdated.  (Horrah!) So I was like, okay, let's update. Come to find out, the updated drivers are 2011 which I don't even know why. Yes, yes I know. Acer Aspire 4339, so so old. But in order to actually download most things, you aren't able to update the Intel Graphics since it's customized by Acer.  (Great!) *sarcasm* Also, whenever I try to update my chipset with the lovely Intel Update utility, I'm slapped in the face with errors. Went to Acer and my product, I can't download the chipset? I don't know. I'm confused on why there's OUTDATED software for Acer Aspire 4339. Not only that, I need an UPDATED version of Intel HD Graphics. The latest driver is literally from 2011. Come on. Why would the video card even be customized by Acer????  Ugh, if ANYONE can find me an UPDATE for Intel HD Graphics on the Intel website thank you, you've saved me from ripping my hair out.  Since there isn't any updates, I won't be able to run MODERN gaming software on this computer.  My Computer specs: Intel Celeron(R) CPU P4600Windows 7  Professional 32-bit (Pretty sure that's all you need.)  My GPU is integrated, too. Since it's a laptop. I need to bypass this OUTDATED driver and get one at LEAST in 2012 and later. I tried so hard to avoid this forum, but Acer pushed me too far and now I'm here. So please, save my hair before I rip it out from the frustration that lovely Acer has given me. 

    bypassing custom Intel drivers is easy. check on programs/features if any Intel VGA drivers is listed and uninstall, if not...go to device manager, choose display adapters, right click your Intel VGA and choose to uninstall, deleting software drivers too. at next reboot, probably windows will be low res  but you will be able to install the latest Intel original VGA drivers.

  • Help with the airport on the psp PLEASE HELP ME!!!!!!!!!!

    I tried hooking up my psp, but unfornatly I got this:
    communication with the server failed
    A DNS error has occured
    (80410410)
    Does anyone know how to fix this?
    I made another topic but noone responed, I am new here is this allowed?

    Please look at this link and describe when you receive this error.
    According to the information here it may be a problem with Sony's WEP implementation.
    Search Google using PSP and the error message. You will find A LOT of posts.

  • I have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    i have one of the old macbooks and wish to hook it up to my tv. do i need a mini dvi to hdmi adapter plus a 3 rca phono lead with a jack for the sound. please help as im useless at this stuff. cheers

    First we need to know which one of the 9 different models of MacBook you have. To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info (and then System Report if you’re running 10.7 Lion). When System Profiler comes up check the Model Identifier and post it back here.
    The Late 2008 model 5,1 Aluminum Unibody and the Late 2009 model 6,1 and Mid 2010 model 7,1 White Unibody have a Mini DisplayPort. The Early 2006 model 1,1 through Early 2008 model 4,1s plus the Early and Mid 2009 model 5,2s have Mini-DVI ports. Each would take a different adapter to connect with the TV.

  • TS4185 I have downloaded facetime from the App store and I keep receiving this message - An internal FaceTime error occurred.  There was a problem with FaceTime. You need to quit and open FaceTime again.  Please help!

    I have downloaded facetime from the App store and I keep receiving this message - An internal FaceTime error occurred.  There was a problem with FaceTime. You need to quit and open FaceTime again.  Please help!

    This error message could result from an incorrect setting for date and time, or an operating system which does not have the latest updates installed.  It's a good idea to have your location setting on automatic.  Turn on the wi fi in your mac for a minute or so, to allow it to automatically search for your present location.  Do this even though you have the correct time Date settings displayed.

  • HT4199 I need help with getting my printer to print, PLEASE.

    I need help with getting my printer to print, Please.

    What have you done so far?
    I suggest you connect it via a usb  cable first.  Once you get the printer working, move to wifi.  You will have to use an existing printer usb cable or purchase a cable.  Be sure to get the correct cable.  Ask for help.
    The warrenty indicates there is phone support.  Give HP a call.
    Warranty
    One-year limited hardware warranty; 24-hour, 7 days a week phone support
    Robert

  • MOVED: need help with my k7n2 delta series motherboard please

    This topic has been moved to AMD SocketA based board.
    need help with my k7n2 delta series motherboard please

    "...the other memory ive been using is  memorymaxx 512mb ddr 3200..." If I understood right, your'e actually using both memories at same time so, your'e lucky if it works. We have said thousand times that mixing dif. brand/make/speed memories is a bad idea, most with this Mobo that is very picky about ram. If you want to avoid slowdown problems, stay with only one stick ( the better one ) until you can buy at same time in same store, 2 identical memories to replace the old one.

  • Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. Thanks.

    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. I am getting lots of spelling errors as the MacBook laptop screen is too small. Thank you so much! .

    Contentmom6 wrote:
    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work.
    Normally, you just connect the monitor to the MacBook using a VGA adaptor that you can buy from an Apple Store.  Now try System Preferences > Displays > Detect Displays.  You should now be able to select a display mode for the monitor.  If it still doesn't work, then I'd check that everything is properly connected.  I've had problems with colours disappearing due to a faulty connection in the VGA adaptor.
    Bob

  • I have a ipod 1st gen, its frozen and wont back up. comes up with error code 1 can someone please help.

    I have a ipod 1st gen. its frozen and wont back up. comes up with error code 1. can someone please help.

    Hi billewen690,
    The resource below may help troubleshoot the issue you are having with your iPod touch being unresponsive.
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on - Apple Support
    https://support.apple.com/en-us/HT201412
    Try these steps:
    Make sure that you have iTunes 12 or later on your computer.
    Put your device in recovery mode.
    When you get the option to restore or update, select Update. This will reinstall iOS without erasing your data.
    Get more help
    If you still need help after trying the steps above, contact Apple Support. 
    Last Modified: Jan 14, 2015
    Hope that helps ...
    - Judy

  • I am having trouble printing I have a connection to my printer wirelessly but does not print out the correct page I want.When I do print I get a bunch of pages more than is needed and also get a code and symbols please help I am jammed at work

    I am having trouble printing I have a connection to my printer wirelessly but does not print out the correct page I want.When I do print I get a bunch of pages more than is needed and also get a code and symbols please help I am jammed at work

    This can be the result of selecting the wrong driver. An older, unsupported laser printer will sometimes work with the generic Postscript driver.

  • I bought 2 same plan for Lightroom accidentally and need to terminate and cancel both of them,please help me

    I bought 2 same plan for Lightroom accidentally and need to terminate and cancel both of them,please help me

    Unfortunately, you will have to contact Adobe directly to do this sort of thing, with the best bet being by phone. They may, or may not, be willing to refund you your purchase cost.

  • I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I cannot install Creative Suite 5.5 on my Windows 7 Professional. I keep getting error message: "Exit Code: 15 - Media DB sync failed". I have disabled UAC and Startup items and Services with no luck. Can you please help?

    I am sorry Erickkasner but there is no longer direct support provided for Creative Suite 5.5 installation issues.
    You are welcome to post any specific errors you are able to discover within your installation log to this discussion.  Since you are using Windows then Exit Code 15 could mean one of the following:
    Installer database is corrupted
    Update pending to your operating system
    Improper permissions set for the Media.db
    The installation log file should provide additional insight into the exact error you are experiencing.  Please make sure to use the find command to look for the words 'ERROR' and 'FATAL' to locate the relevant error messages.

  • What's happening when i turn on my laptop it's blinking, I need to shut down or restart again. Please help!

    What's happening when i turn on my laptop it's blinking, I need to shut down or restart again. Please help!

    Hello Melophage,
    Thanks. Done..:)
    BTW, I got another issue, hope can help me, I'm updating my OS X maverick to new one 10.9.2, while updating I need to restart my laptop to update, however i got this error message, "Install Failed! OS X could not be installed on your computer. The installer encounter an error that caused the installation fail. Contact the software manufacturer for assistance. Click Restart to restart your computerand try installing again." I did that so many times, unfortunately, nothing happens. This is the 1st time Ive ever encounter that issue while updating my Mac. Now, i cannot even go to my main menu, coz everytime I turn on my laptop it's shows the updating process and go back to failed installation. Thanks.

  • Hello, i have a problem with this number code  213:19,  please help me!

    Hello, i have a problem with this number code  213:19,  please help me!

    dan
    What version of Premiere Elements and on what computer operating system is it running?
    If you are using Premiere Elements 13, have you updated it to 13.1 yet? If not, please do so using an opened project's Help Menu/Updates.
    What type of user account are you using....local administrator or domain type?
    Please review the following Adobe document on the 213.19 issue. Have you read that already?
    Error 213:19 | Problem has occurred with the licensing of this product
    ATR

Maybe you are looking for

  • Exporting Gerber file in Ultiboard 10 for school project

    I am trying to export a PCB design in Ultiboard 10 but the export option is grayed out on file menu. I am using the evaluation verison of Power Pro because I was told by tech support that my student verison does not allow exporting. I would great app

  • Problem in Installing SAP GUI 6.2 Patch 57

    Hi friends,      Currently we have SAP GUI 6.2 version for Windows with Patch level 32. We need to update with Patch level 57. But, we are ending with an error saying SAP GUI front end needs to be installed. Could anyone please help in resolving this

  • How does the invitees feature work in the Calendar on the iPhone 4S?

    I've used it several times and no one I invite to an event have received any type of notice.

  • Limit access on returned Collection

    Hello, is it possible to write a method to return a collection and don't allow the caller to add or remove objects from the collection, but allow the caller modify the objects in the collection.

  • Imac performance question.

    After recently poking and prodding Logic Express, I've come to realization my computer isn't really cutting it. I run a late 2004 1.8ghz PowerMac with 4gb of ram. I could upgrade the ram a bit, but my understanding is that won't help as much as a fas