PLEASE HELP!! with this java problem...

Ok so I have this assignment regarding Loan calculations: Compute the Monthly Payments given> the APR, #of payments, and amount borrowed. The formula for this is...P= Cr(1+r)^N / (1+r)^N -1 Where P is aount payable each month, r is APR which needs to be converted into months by /12, N is number of payments, and C is total amount owed. I got this:
import java.lang.Math;
import java.util.Scanner;
public class ComputeSomething
public static void main (String s[])
//obtain input from the user
//validate input
//proceed if input is valid
//process input
//repeat the above four steps until "quit"
Scanner input = new Scanner (System.in);
double payable_amount; // P
double amount_owed; //C
int number_of_payments; //N
double rate; //r
double numerator, denominator;
System.out.print("Enter the value of amount borrowed/owed: ");
amount_owed = input.nextDouble ();
System.out.println ();
System.out.print ("Enter the value of number of payments: ");
number_of_payments = input.nextInt ();
System.out.println ();
System.out.print ("Enter the value of rate as a percentage, e.g., 10 for 10%: ");
rate = input.nextDouble ();
System.out.println ();
rate = rate/(100*12) ;
numerator = amount_owed * rate * Math.pow ((1+rate),number_of_payments);
denominator = Math.pow ((1+rate),number_of_payments) - 1;
payable_amount = numerator/denominator;
System.out.println("The amount payable per month = " + payable_amount);
// // implement the second formula
// numerator = Math.log (payable_amount/amount_owed) - Math.log ((payable_amount/amount_owed) - rate);
// denominator = Math.log (1+rate);
// number_of_payments = (int)Math.round (numerator/denominator);
NOW I have to change it around for the second formula and this is where I am lost cause it has logarithms....This formula goes like this N= ln P/C - ln (P/C-r) / ln(1+r) Where N is the number of monthly payments, C is the sum of actual amount borrowed which is given and r is APR, and P is the monthly payment and ln is the natural logarithm. SO in this formula I have to calculate the NUMBER of payments given the other input.... This project is just a simple command line format so the user just types in the inputs. ALSO there needs to be a command to end the session and the program needs to handle incorrect input too!!
**I dont know how to do the second formula PLEASE HELP ME.....the formulas in picture format are located at http://www.efunda.com/formulae/finance/loan_calculator.cfm**

Oh man sorry..what I mean to say is that yes it is a command line type program (no menus) and its going to be in the following format: you type 1 for calculating monthly payments, type 2 for #of payments, and then type 0 to quit. When you type 1 or 2 then the correct formula for each option will then be utilized by asking the input for the fields kinda like this program for a simple fahrenheit to celsius conversion:
import java.util.Scanner;
public class TempConverter
// solution to inclass assignment
public static void main (String s[])
double temp_in_celsius;
double temp_in_fahrenheit;
Scanner input = new Scanner (System.in); // create a connection 'object' to read data from the k/b
// create the menu that is displayed to the user
System.out.println ("Choose 1 to convert temp. from C to F, 2 to convert temp. from F to C and any other value to quit");
int choice = 0;
if (input.hasNextInt ())
System.out.println ("correct data type");
choice = input.nextInt ();
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
// while choice is either one or two, continue; quit otherwise.
while(choice == 1 || choice == 2)
if (choice == 1)
//code for converting temp from C to F
System.out.println ("Enter the value of temp. in the C scale: " );
if (input.hasNextDouble ())
temp_in_celsius = input.nextDouble ();
temp_in_fahrenheit = ( (9/5.0) * temp_in_celsius ) + 32;
System.out.println ( temp_in_celsius + " in degrees C is " + temp_in_fahrenheit + " in degrees F");
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
else if (choice == 2)
//code for converting temp from F to C
System.out.println ("Enter the value of temp. in the F scale: " );
if (input.hasNextDouble ())
temp_in_fahrenheit = input.nextDouble ();
temp_in_celsius = (5/9.0) * (temp_in_fahrenheit-32); //convert the temp to the C scale
System.out.println (temp_in_fahrenheit + " in degrees F is " temp_in_celsius " in degrees C");
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
else
System.out.println ("Quitting");
System.out.println ("Choose 1 to convert temp. from C to F, 2 to convert temp. from F to C and any other value to quit");
if (input.hasNextInt ())
System.out.println ("correct data type");
choice = input.nextInt ();
else
System.out.println ("incorrect data entered -- program terminated!");
System.exit (0);
}

Similar Messages

  • Please, help with this strange problem

    Hi,
    I'm trying to get the serial value of a informix serial column after inserting a record. I'm using the ifxjdbc driver for Informix (v 2.2).
    I've written the code below:
    Connection conn = null;
    PreparedStatement st = null;
    try
    conn = ds.getConnection();
    st = conn.prepareStatement("INSERT INTO Comunicats (vchTitle) "+
    "VALUES (?)");
    st.setString(1,vchTitle);
    if (st.executeUpdate() != 1) throw new EJBException();
    /** Now getting the Primary key inserted **/
    long sCodCom = ((IfmxStatement)st).getSerial();
    st.close();
    conn.close();
    where I'm getting the connection from a datasource (ds) connected to a Informix pool using that driver (com.informix.jdbc.ifxDriver)
    This code inserts the row but fails getting the serial value. The error message is:
    "java.lang.ClassCastException: weblogic.jdbc.rmi.SerialPreparedStatement (...) "
    Obviously, the cast ((IfmxStatement)st) doesn't work.
    If I change how to get the connection, and I use the DriverManager and declare a Statement st variable (instead of a preparedStatement variable):
    conn = DriverManager.getConnection(Informix_Url);
    Statement st = conn.createStatement();
    int nRet = st.executeUpdate("INSERT INTO ...");
    Then it works.
    But I don't wanna use the DriverManager. I wanna use my pool and datasource to get the connection.
    Has anybody tried something similar successfully?
    Thanks a lot.
    Joan.

    Hello jbalaguero,
    We are now facing the same problem ie. it works with DriverManager connection but not with Weblogic Connection Pool connection!
    Where you able to solve this problem? If yes please tell how!
    Thanks.
    Hi,
    I'm trying to get the serial value of a informix
    serial column after inserting a record. I'm using the
    ifxjdbc driver for Informix (v 2.2).
    I've written the code below:
    Connection conn = null;
    PreparedStatement st = null;
    try
    conn = ds.getConnection();
    st = conn.prepareStatement("INSERT INTO Comunicats
    (vchTitle) "+
    "VALUES (?)");
    st.setString(1,vchTitle);
    if (st.executeUpdate() != 1) throw new
    EJBException();
    /** Now getting the Primary key inserted **/
    long sCodCom = ((IfmxStatement)st).getSerial();
    st.close();
    conn.close();
    where I'm getting the connection from a datasource
    (ds) connected to a Informix pool using that driver
    (com.informix.jdbc.ifxDriver)
    This code inserts the row but fails getting the serial
    value. The error message is:
    "java.lang.ClassCastException:
    weblogic.jdbc.rmi.SerialPreparedStatement (...) "
    Obviously, the cast ((IfmxStatement)st) doesn't work.
    If I change how to get the connection, and I use the
    DriverManager and declare a Statement st variable
    (instead of a preparedStatement variable):
    conn = DriverManager.getConnection(Informix_Url);
    Statement st = conn.createStatement();
    int nRet = st.executeUpdate("INSERT INTO ...");
    Then it works.
    But I don't wanna use the DriverManager. I wanna use
    my pool and datasource to get the connection.
    Has anybody tried something similar successfully?
    Thanks a lot.
    Joan.

  • Please help with this select problem.

    Hi,
    I am trying to run the following PL-SQL:
    declare
    p binary_integer := 2;
    begin
    loop
         insert into xyz
         values
         (p, (select time_b from xyz where id = (p - 1)) + (time '00:00:01' - time '00:00:00'), 'text');          
         loop_count := loop_count + 1;
         exit when loop_count = 10;
    end loop;
    end;
    When I run this, I get the error "encountered the symbol "select" when expecting one of the following symbols..." However, When I run the following query, it inserts the appropriate record:
    insert into xyz
         values
         (p, (select time_b from xyz where id = 1) + (time '00:00:01' - time '00:00:00'), 'text');     
    Anybody help?
    Thanks,
    Message was edited by:
    user494578

    And do you have a good reason to use PL/SQL instead of plain SQL ?
    In SQL you could just do this:
    SQL> create table xyz
      2  as
      3  select 0 x, sysdate time_b, 'text' text from dual
      4  /
    Tabel is aangemaakt.
    SQL> set verify off
    SQL> define P_LAST_X=idle
    SQL> define P_LAST_TIME_B=idle
    SQL> column x new_value P_LAST_X
    SQL> column time_b new_value P_LAST_TIME_B
    SQL> select max(x) x
      2       , to_char(max(time_b) keep (dense_rank last order by x),'dd-mm-yyyy hh24:mi:ss') time_b
      3    from xyz
      4  /
                                         X TIME_B
                                         0 11-10-2006 16:58:07
    1 rij is geselecteerd.
    SQL> insert into xyz
      2  select &P_LAST_X + l
      3       , to_date('&P_LAST_TIME_B','dd-mm-yyyy hh24:mi:ss') + l/24/60/60
      4       , 'text'
      5    from (select level l from dual connect by level <= 10)
      6  /
    10 rijen zijn aangemaakt.
    SQL> select * from xyz
      2  /
                                         X TIME_B              TEXT
                                         0 11-10-2006 16:58:07 text
                                         1 11-10-2006 16:58:08 text
                                         2 11-10-2006 16:58:09 text
                                         3 11-10-2006 16:58:10 text
                                         4 11-10-2006 16:58:11 text
                                         5 11-10-2006 16:58:12 text
                                         6 11-10-2006 16:58:13 text
                                         7 11-10-2006 16:58:14 text
                                         8 11-10-2006 16:58:15 text
                                         9 11-10-2006 16:58:16 text
                                        10 11-10-2006 16:58:17 textHope this helps.
    Regards,
    Rob.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Please I really need help with this video problem.

    Hi!
    Please I need help with this app I am trying to make for an Android cellphone and I've been struggling with this for a couple of months.
    I have a main flash file (video player.fla) that will load external swf files. This is the main screen.When I click the Sets Anteriores button I want to open another swf file called sets.swf.The app is freezing when I click Sets Anteriores button
    Here is the code for this fla file.
    import flash.events.MouseEvent;
    preloaderBar.visible = false;
    var loader:Loader = new Loader();
    btHome.enabled = false;
    var filme : String = "";
    carregaFilme("home.swf");
    function carregaFilme(filme : String ) :void
      var reqMovie:URLRequest = new URLRequest(filme);
      loader.load(reqMovie);
      loader.contentLoaderInfo.addEventListener(Event.OPEN,comeco);
      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progresso);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completo);
      palco.addChild(loader); 
    function comeco(event:Event):void
              preloaderBar.visible = true;
              preloaderBar.barra.scaleX = 0;
    function progresso(e:ProgressEvent):void
              var perc:Number = e.bytesLoaded / e.bytesTotal;
              preloaderBar.percent.text = Math.ceil(perc*100).toString();
              preloaderBar.barra.scaleX =  perc;
    function completo(e:Event):void
              preloaderBar.percent.text = '';
              preloaderBar.visible = false;
    btHome.addEventListener(MouseEvent.MOUSE_DOWN,onHomeDown);
    btHome.addEventListener(MouseEvent.MOUSE_UP,onHomeUp);
    btSets.addEventListener(MouseEvent.MOUSE_DOWN,onSetsDown);
    btSets.addEventListener(MouseEvent.MOUSE_UP,onSetsUp);
    btVivo.addEventListener(MouseEvent.MOUSE_DOWN,onVivoDown);
    btVivo.addEventListener(MouseEvent.MOUSE_UP,onVivoUp);
    btHome.addEventListener(MouseEvent.CLICK,onHomeClick);
    btSets.addEventListener(MouseEvent.CLICK,onSetsClick);
    function onSetsClick(Event : MouseEvent) : void
              if (filme != "sets.swf")
                          filme = "sets.swf";
                          carregaFilme("sets.swf");
    function onHomeClick(Event : MouseEvent) : void
              if (filme != "home.swf")
                          filme = "home.swf";
                          carregaFilme("home.swf");
    function onHomeDown(Event : MouseEvent) : void
              btHome.y += 1;
    function onHomeUp(Event : MouseEvent) : void
              btHome.y -= 1;
    function onSetsDown(Event : MouseEvent) : void
              btSets.y += 1;
    function onSetsUp(Event : MouseEvent) : void
              btSets.y -= 1;
    function onVivoDown(Event : MouseEvent) : void
              btVivo.y += 1;
    function onVivoUp(Event : MouseEvent) : void
              btVivo.y -= 1;
    Now this is the sets.fla file:
    Here is the code for sets.fla
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    var video:Video;
    var nc:NetConnection;
    var ns:NetStream;
    var t : Timer = new Timer(1000,0);
    var meta:Object = new Object();
    this.addEventListener(Event.ADDED_TO_STAGE,init);
    function init(e:Event):void{
    video= new Video(320, 240);
    addChild(video);
    video.x = 80;
    video.y = 100;
    nc= new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
    ns.bufferTime = 1;
    ns.client = meta;
    video.attachNetStream(ns);
    ns.play("http://www.djchambinho.com/videos/segundaquinta.flv");
    ns.pause();
    t.addEventListener(TimerEvent.TIMER,timeHandler);
    t.start();
    function onStatusEvent(stat:Object):void
              trace(stat.info.code);
    meta.onMetaData = function(meta:Object)
              trace(meta.duration);
    function timeHandler(event : TimerEvent) : void
      if (ns.bytesLoaded>0&&ns.bytesLoaded == ns.bytesTotal )
                ns.resume();
                t.removeEventListener(TimerEvent.TIMER,timeHandler);
                t.stop();
    The problem is when I test it on my computer it works but when I upload it to my phone it freezes when I click Sets Anteriores button.
    Please help me with this problem I dont know what else to do.
    thank you

    My first guess is you're simply generating an error. You'll always want to load this on your device in quick debugging over USB so you can see any errors you're generating.
    Outside that, if you plan on accessing anything inside the SWF you should be loading the SWF into the correct context. Relevant sample code:
    var context:LoaderContext = new LoaderContext();
    context.securityDomain = SecurityDomain.currentDomain;
    context.applicationDomain = ApplicationDomain.currentDomain;
    var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");
    var ldr:Loader = new Loader();
    ldr.load(urlReq, context);
    More information:
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7de0.html
    If you're doing this on iOS you'll need to stripped SWFs if you plan on using any coding (ABC) inside the files. You mentioned iOS so I won't get into that here, but just incase, here's info on stripping external SWFs:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/

  • Please help with Nokia N95 problem.

    If anyone can help with this I’d be much appreciated, I have a N95 on contract with T-Mobile. When I try to play videos from myspace, or you tube etc… I get a message telling me the following.
    “Hello, Either you either have JavaScript turned off or an old version of macromedia's flash player click here to get the latest flash player”.
    I then get the option of clicking on a link within the previous sentence statement that directs me to acrobat downloads home page where I get the following message.
    “We are unable to locate a web player that matches your platform and browser. Please visit our table of recommended web players”
    This is deeply frustrating as in nearly every other way I feel the phone is perfect. If Any one can hep me fix this problem I’d be much appreciated.

    daperk,
    You should post this to board "Smartphones, Nseries and Eseries Devices".

  • Please help with Sun Java System Communications Sync crashe with IEx 7.x

    Dear All!
    Recently i've upgrade my IExplorer to 7.x version. After that i began to have problems with Communications Sync (latest version). When i try to sync Outlook 2003 with the server (SSL connection/ self signed certificate) the Comm Sync asks if i want to allow to open connection with wrong certificate (happed only after installing IEx 7.x) and then when i press YES it crashes.
    Any help on how to fix this problem is appriciated.
    Konstantin
    P.S.: Adding a self signed certificate to IEx DB and adding the website to the trusted websites list did not help.

    Hi,
    Not sure how much we can help with this issue - especially if you are already running the latest version of the sync tool. About all I can offer is to uninstall your current sync software and reinstall the latest public version:
    http://sunsolve.sun.com/private-cgi/getpatch.pl (search for patch #124734).
    If that doesn't help I suggest you log a sun support case for this (assuming you have a sun support contract that is).
    Regards,
    Shane.

  • I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect to my MacBook it erases everything on had on there. Can someone please help with this problem?

    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.

    dwgar1322 wrote:
    I have just started using WD external hard drives, I use it to save my movies and music on. On more than one occasion, when I connect it to my MacBook it erases everything I had save on the hard drive. Can someone please help me with this problem? I am super tired of having to put all of my movies and music on the hard drive just to have it erased again. The products I am using are WD 4TB My Book and 2 TB My Passport external hard drives. When it happens, there is always an icon that reads, EFI, along with the My Book icon. Thank you for your assisstance.
    Yes, you have WD software installed  REMOVE IT !! 
    WD has warned its customers about their huge mistake that their software doesnt work on Mavericks and causes data loss.
    (also dont use WD drives anymore)
    Read all about it here:
    https://discussions.apple.com/thread/5475136?start=255&tstart=0
    See their website on removing the destructive WD software here:
    http://community.wd.com/t5/External-Drives-for-Mac/External-Drives-for-Mac-Exper iencing-Data-Loss-with-Maverick-OS/td-p/613775
    Western Digital External Hard Drives Experiencing Data Loss On OS X Mavericks
    http://www.cultofmac.com/252826/western-digital-external-hard-drives-experiencin g-data-loss-on-os-x-mavericks/

  • Please help with an RMI problem

    Hi,
    This is probably a really simple problem which i can't spot, but i have the folloing 'HelloWorld' RMI program:
    The Client Program:
    import java.rmi.*;
    public class HelloClient {
         public static void main(String args[]) {
              if(System.getSecurityManager() == null) {
                   System.setSecurityManager(new RMISecurityManager());
              try {
                   HelloInterface obj = (HelloInterface)Naming.lookup("/HelloServer");
                   String message = obj.sayHello();
                   System.out.println(message);
                   Thread.sleep(10000);
              } catch (Exception e) {
                   System.out.println("HelloClient exception: " + e);
    }The Remote Interface:
    public interface HelloInterface extends java.rmi.Remote {
         public String sayHello() throws java.rmi.RemoteException;
    }The Server Program:
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.util.Date;
    public class HelloServer extends UnicastRemoteObject implements HelloInterface {
         public HelloServer() throws RemoteException {
              super();
         public String sayHello() throws RemoteException {
              return "Hello World, the current system time is " + new Date();
    }And finally the class which binds the object to the registery:
    import java.rmi.*;
    public class RegisterIt {
         public static void main(String args[]) {
              try {
                   HelloServer obj = new HelloServer();
                   System.out.println("Object instantiated: " + obj);
                   Naming.rebind("/HelloServer", obj);
                   System.out.println("HelloServer bound to registery");
              } catch (Exception e) {
                   System.out.println(e);
    }Now, this program works fine on my computer at home(XP!!!!!) but when i try to run it on the computers in college which run NT, it comes up with the following exceptions when i try to run RegisterIt:
    Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    Java.lang.ClassNotFoundException: HelloServer_StubThis is saying that it cannot find the stub which is generated, but i use the folloing .bat file to load up the program:
    echo Creating remote object skelton classes....
    rmic -d . HelloServer
    start rmiregistry -J-Djava.security.policy=test.policy
    start java RegisterIt
    start java -Djava.security.policy=test.policy HelloClientThe stub is definitely created(it worked at home and i have checked in the directory and there are clearly the files HelloServer_Stub.class and HelloServer_Skel.class). The PATH is set correctly otherwise the registery would not be able to run correctly etc and therefore i am completely stuck as to why it doesn't work.
    Please help as it is very important for me.
    Many Thanks
    Cath

    I did not have any problem with Windows 2000 at all but only with Windows XP (and to think XP is a 2000 hybrid!).
    I have the same error: a ClassNotFoundException on the stub file.
    Any help will be appreciated. Thanks.

  • Please help with this method

    im creating a little animation of pacman, just an animation of it moving buy its self. im using the java elements package so this is all being shown in a drawing window.
    ive made it move fine and go round the window abit eating dots but the code is a mess, and i know i could change some of the main part into a few simple methods and have tried but it seems to stop moving when i try
    below is part of the code, the first three blocks are when its moving sideways with its mouth in three different states, and the bottom three blocks are it moving down with its mouth in three states again.
    Arc pacarc = new Arc();
    while (startmv++<stopmv)
    pac1x += 4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth1,pacangle1);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    pac1x += 4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth2,pacangle2);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    pac1x += 4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,pacsize1,pacsize2,pacmouth3,pacangle3);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    while (startdwn++<stopdwn)
    pac1y +=4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,50,50,pacdwn1,pacdwnang1);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    pac1y +=4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,50,50,pacdwn2,pacdwnang2);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    pac1y +=4;
    d.setForeground(Color.yellow);
    pacarc = new Arc(pac1x,pac1y,50,50,pacdwn3,pacdwnang3);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    so for the first part i tried putting this into a method and running the program but where i had used the method the pacman shape just stayed still. any help please guys?
    this is the code for the method i tried (this is just for thefirst state of the pacmans mouth while moving sideways)
    public static void pacmve(int pactestx, int pactesty, int pacsizetest1, int pacsizetest2, int pacmouthtest, int pacangletest)
    pactestx += 4;
    Arc pacarc = new Arc();
    d.setForeground(Color.yellow);
    pacarc = new Arc(pactestx,pactesty,pacsizetest1,pacsizetest2,pacmouthtest,pacangletest);
    d.fill(pacarc);
    d.setForeground(Color.black);
    waitNSeconds(1);
    d.fill(pacarc);
    this is the loop i where i was trying to use the method
    while (startmv++<stopmv)
    pacmve(20,20,50,50,45,270);
    Edited by: jeffsimmo85 on Nov 22, 2007 1:18 AM

    When you post a code on a public forum, the code must be:
    1)Properly formatted using code tags.
    2)Generally compilable and runnable for us casual forum viewers.
    3)Reproducible of your problems when we run it.

  • Please Help in this webcam problem,Its Urgent

    Hi,
    I have a final yr project by which I can see the picture(whenever I want) of a webcam of a Home PC from my mobile device.
    For that I have to write a Java program which will capture the picture from webcam and changed the file format to PNG and then saved it to some directory.Whenever I will run the Java program it will automatically save a picture in the directory and it will do continuously after 5 sec and overwrite the older picture.
    Can anyone help me with the code or some sorts of code.
    Please help me as it is quite urgent.

    Sorry, this forum is for solving specific problems, not for begging for help. If you have a specific problem you need help with, then ask...but I doubt anyone is going to put in the time to help you with a project you havn't put in the time to have specific problems with.

  • Please help with this issue "To Run a SSIS Package outside of Server Data Tools You must install Drived Column of Integration sercvies of higher" From C# app

     i have searched all over the google and here on MSDN(I have read all the threads related to my problem ) , i am new to SISS and doing my clg project ,
    I have this package which loads data from  dim tables to a fact table , my Package runs without any problem in BIDS (2012)
    I have installed SQl Server integration services on SQL and service is also running in services.msc,
    the problem comes when i execute my package using my C# application i am using MSDN Method to execute a SSIS package programmatically given here.
    "http://msdn.microsoft.com/en-us/library/ms136090.aspx"
    For loading my FactTable i have used a Derived columns  and some lookups , 
    Now if i don't use derived columns and looks ups and just use source and destination component then my package runs fine from my C# application but if i use derived columns or looks ups etc it gives the following error
    "Error in Microsoft.SqlServer.Dts.Runtime.TaskHost/SSIS.Pipeline: To Run a SSIS package outside of SQL Server Data Tools you must Install Derived Column of Integration services of higher"
    I am searching and trying to resolve this issue from previous 2 days but without any luck please help or guide me what is solution to this problem ,,i will be very thankful
    I have also found that integration services that are running on my system have version  10.0
    but the BIDS have version Version 11.0.3402.0
    IS this causing problem ?  if yes then what i have to do  ?

    Hi BlaxButt,
    The package is developed in SSDT installed by SQL Server 2012, so it is a SSIS 2012 package. However, the Integration Services you have installed is SQL Server 2008 R2 version. To run the package outside SSDT, you need SSIS 2012 installed. The reason why
    the package runs fine with only Source and Destination components is that such a simple package can be executed by the DTExec utility installed by SQL Server 2012 Data base Engine or Client Tools (SQL Server Import and Export Wizard). To run a package that
    uses other tasks/components outside SSDT/BIDS, the SSIS runtime is also required except the DTExec utility. To obtain the SSIS 2012 runtime, we have to install SSIS 2012 on the server where the package runs.
    Reference:
    http://stackoverflow.com/questions/19989099/getting-error-running-ssis-package-on-non-ssis-server
    Regards,
    Mike Yin
    TechNet Community Support

  • Hello, im new to mac and I need some help with a java problem.

    Hello, im new to mac. I just need someone who can help with a problem ive come across when playing online games that run java. The game is arcanists. its on the funorb website. really fun game and i love it, but i cant play it without my screen keep scrolling or my character not responding at all. please get back at me ASAP. thx apple friends!

    FF has an extention that can be used to increase the conection speed. Its called Tweak Network 1.1 I see a difference on my iMac G5. Its not huge but it may be a big difference on yours.
    http://www.bitstorm.org/extensions/tweak/

  • Urgent Please help with a Conferencing problem in CUCM 6.1

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    We have a configuration of CUCM 6.1. We have 24 voice ports (FXO) configured in H 323 registered with the call manger.  A CUE 3.2 configured for IVR and mail box. Gateway is a Cisco 3845 and the IOS version is 12.4(15) T10
    The problem is whenever a conference is configured with an outside number the FXO port is not releasing after the call disconnects.  It is not FXO disconnect problem. This happens only when a conference is taking place. There is no problem with any other outside or inside calls.
    I am attaching the configuration of Gateway. Please help me with the problem, I am very much thankful for you that.

    The Family pack covers upto 5 computers, other Install Disc cover one computer only.

Maybe you are looking for