I need help getting this program to work.

K. I don't pay much attention in my AP Comp Science Class.. but my teacher said if i can get this program to work i get an a for the semester... The program is Metrowerks Codewarrior IDE.. we are running it on windows 98 i think. She said she can't get it to compile.. so i guess it just needs to be able to input simple java programs (i.e. loops, just the regular crap) and compile them and run them...i have no clue what is wrong with it.. it could just need a patch...or we may just be going about it the wrong way...any help would be SUPER appreciated...

K. I don't pay much attention in my AP Comp Science
Class.. but my teacher said if i can get this programYou better did.
to work i get an a for the semester... The program is
Metrowerks Codewarrior IDE.. we are running it on
windows 98 i think. She said she can't get it toAtleast be sure of the OS.
compile.. so i guess it just needs to be able to
input simple java programs (i.e. loops, just the
regular crap) and compile them and run them...i have
no clue what is wrong with it.. it could just need aEven we don't.
patch...or we may just be going about it the wrong
way...any help would be SUPER appreciated...Nothing in your thread really speaks of the problem. And since you mentioned homework, there's hardly anyone to be interested in that.
Regards
***Annie***

Similar Messages

  • Need help getting this code to work

    I am trying to get this code to work using "if else statment" but it will only do the first part and not do the second part in the else statement. Can anyone help me out? Here is the code:
    var R1 = this.getField("Registration Fees1");
    var R2 = this.getField("Registration Fees2");
    var R3 = this.getField("Registration Fees3");
    var R4 = this.getField("Registration Fees4");
    var R0 = 0
    if (R0 == 0)
      event.value = Math.floor(R1.value);
    else
      event.value = Math.floor(R2.value + R3.value + R4.value);
    I did notice that if I fiddled around this this part:
    if (R0 == 0)
    sometimes I can get the second part to work but not the first. I need it to do either or and this is getting frustrating.
    I might also not even need "var R0 = 0". I put that there for the condition part. If that is what is causing the problem, I can take it out. But then what would the condition be? For this form, the default is 0 and then the calculation follows by user clicking on different prices. The first part is if they want to pay for the full conference and the second part is if they want to pay for either Monday, Tuesday or Wednesday or 2 of the 3 days. Is it possible to get this to work with both parts together? I am still stuck on getting just one or the other working. Any help would be greatly appreciated. Thanks in advance.

    I have posted this on another message board and a user by the name of gkaiseril offered this solution but it hasn't worked either.
    // all four days
    var R1 = this.getField("Registration Fees1").value;
    // Monday
    var R2 = this.getField("Registration Fees2").value;
    // Tuesday
    var R3 = this.getField("Registration Fees3").value;
    // Wednesday
    var R4 = this.getField("Registration Fees4").value;
    var Fee = 0
    event.value = ''; // default value
    if (R1 != 'Off') {
      Fee = Number(R1) + Fee;
    } else {
      if(R2 != 'Off') {
         Fee = Number(Fee) + R2;
      if(R3 != 'Off') {
         Fee += Number(R3);
      if(R4 != 'Off') {
         Fee = Number(R4) + Fee;
    event.value = Fee;

  • How can I get this program to work -- Adobe Send or Adobe SendNow

    How can I get this program to work?  I have used Adobe SendNow successfully for several years and am on automatic renewal and getting nothing but frustration for my money!  I have been unsuccessful at sending anything in the past several months.  Today while working on a deadline and many unsuccessful attempts to upload files, I signed up for a free trial at a competitor in order to get my files sent.  Want a refund  -- or better yet, keep my money and get it to work right again.

    You can't.
    Sounds like it he gave you a stolen iPhone or at least a worthless one.

  • I need help getting my printer to work

    I need help getting my printer to work

    http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/Want-Good-Answers-Ask-Good-Questions/td...
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Need help getting this Java app to work on Mac OS X

    Aloha all,
    I am testing this new Java app that was built that is based on th Axis and Allies strategy gaming engine. On the PC the author wrote a .bat file to launch the app and the JVM. But when I try and enter the arguments on the Mac OS X via the terminal window I get the Usage/Options argument options back. The ,bat file goes as follows:
    java -Xincgc -classpath ../classes;../lib/crimson.jar;../lib/jaxp.jar games.strategy.engine.framework.GameRunner
    It looks to me as if OS X if having problems with -Xincgc argument. I checked to see if I needed to download the JVM, but according to Apple it is already built in. Is there another way to enter the arguments to get this app to launch?
    Maui Duck

    Does OS X use ';' as a separator like windows, or does it use ':' like UNIX. that might be the problem.

  • New to Java and need help with this program..please!

    I'd really appreciate any helpful comments about this program assignment that I have to turn in a week from Friday. I'm taking a class one night a week and completely new to Java. I'd ask my professor for help, but we can't call him during the week and he never answers e-mails. He didn't tell us how to call from other classes yet, and I just can't get the darn thing to do what I want it to do!
    The assignment requirements are:
    1. Change a card game application that draws two cards
    and the higher card wins, to a Blackjack application
    2. Include a new class called Hand
    3. The Hand class should record the number of draws
    4. The application should prompt for a number of draws
    5. The game is played against the Dealer
    6. The dealer always draws a card if the dealer's hand total is <= 17
    7. Prompt the player after each hand if he wants to quit
    8. Display the total games won by the dealer and total and the total games wond by the player after each hand
    9. Display all of the dealer's and player's cards at the
    end of each hand
    10. Player has the option of drawing an additional card after the first two cards
    11. The Ace can have a value of 11 or 1
    (Even though it's not called for in the requirements, I would like to be able to let the Ace have a value of 1 or an 11)
    The following is my code with some comments about a few things that are driving me nuts:
    import java.util.*;
    import javax.swing.*;
    import java.text.*;
    public class CardDeck
    public CardDeck()
    deck = new Card[52];
    fill();
    shuffle();
    public void fill()
    int i;
    int j;
    for (i = 1; i <= 13; i++)
    for (j = 1; j <= 4; j++)
    deck[4 * (i - 1) + j - 1] = new Card(i, j);
    cards = 52;
    public void shuffle()
    int next;
    for (next = 0; next < cards - 1; next++)
    int rand = (int)(Math.random()*(next+1));
    Card temp = deck[next];
    deck[next] = deck[rand];
    deck[rand] = temp;
    public final Card draw()
    if (cards == 0)
    return null;
    cards--;
    return deck[cards];
    public int changeValue()
    int val = 0;
    boolean ace = false;
    int cds;
    for (int i = 0; i < cards; i++)
    if (cardValue > 10)
    cardValue = 10;
    if (cardValue ==1)     {
    ace = true;
    val = val + cardValue;
    if ( ace = true && val + 10 <= 21 )
    val = val + 10;
    return val;
    public static void main(String[] args)
    CardDeck d = new CardDeck();
    int x = 3;
    int i;
    int wins = 1;
    int playerTotal = 1;
    do {
    Card dealer = (d.draw());
    /**I've tried everything I can think of to call the ChangeValue() method after I draw the card, but nothing is working for me.**/
    System.out.println("Dealer draws: " + dealer);
    do {
    dealer = (d.draw());
    System.out.println(" " + dealer);
    }while (dealer.rank() <= 17);
    Card mine = d.draw();
    System.out.println("\t\t\t\t Player draws: "
    + mine);
    mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
    do{
    String input = JOptionPane.showInputDialog
    ("Would you like a card? ");
    if(input.equalsIgnoreCase("yes"))
         mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
         playerTotal++;
         else if(input.equalsIgnoreCase("no"))
    System.out.println("\t\t\t\t Player stands");
         else
    System.out.println("\t\tInvalid input.
    Please try again.");
    I don't know how to go about making and calling a method or class that will combine the total cards delt to the player and the total cards delt to the dealer. The rank() method only seems to give me the last cards drawn to compare with when I try to do the tests.**/
    if ((dealer.rank() > mine.rank())
    && (dealer.rank() <= 21)
    || (mine.rank() > 21)
    && (dealer.rank() < 22)
    || ((dealer.rank() == 21)
    && (mine.rank() == 21))
    || ((mine.rank() > 21)
    && (dealer.rank() <= 21)))
    System.out.println("Dealer wins");
    wins++;
         else
    System.out.println("I win!");
    break;
    } while (playerTotal <= 1);
    String stop = JOptionPane.showInputDialog
    ("Would you like to play again? ");
    if (stop.equalsIgnoreCase("no"))
    break;
    if (rounds == 5)
    System.out.println("Player wins " +
    (CardDeck.rounds - wins) + "rounds");
    } while (rounds <= 5);
    private Card[] deck;
    private int cards;
    public static int rounds = 1;
    public int cardValue;
    /**When I try to compile this nested class, I get an error message saying I need a brace here and at the end of the program. I don't know if any of this code would work because I've tried adding braces and still can't compile it.**/
    class Hand()
    static int r = 1;
    public Hand() { CardDeck.rounds = r; }
    public int getRounds() { return r++; }
    final class Card
    public static final int ACE = 1;
    public static final int JACK = 11;
    public static final int QUEEN = 12;
    public static final int KING = 13;
    public static final int CLUBS = 1;
    public static final int DIAMONDS = 2;
    public static final int HEARTS = 3;
    public static final int SPADES = 4;
    public Card(int v, int s)
    value = v;
    suit = s;
    public int getValue() { return value; }
    public int getSuit() { return suit;  }
    public int rank()
    if (value == 1)
    return 4 * 13 + suit;
    else
    return 4 * (value - 1) + suit;
    /**This works, but I'm confused. How is this method called? Does it call itself?**/
    public String toString()
    String v;
    String s;
    if (value == ACE)
    v = "Ace";
    else if (value == JACK)
    v = "Jack";
    else if (value == QUEEN)
    v = "Queen";
    else if (value == KING)
    v = "King";
    else
    v = String.valueOf(value);
    if (suit == DIAMONDS)
    s = "Diamonds";
    else if (suit == HEARTS)
    s = "Hearts";
    else if (suit == SPADES)
    s = "Spades";
    else
    s = "Clubs";
    return v + " of " + s;
    private int value; //Value is an integer, so how can a
    private int suit; //string be assigned to an integer?
    }

    Thank you so much for offering to help me with this Jamie! When I tried to call change value using:
    Card dealer = (d.changeValue());
    I get an error message saying:
    Incompatible types found: int
    required: Card
    I had my weekly class last night and the professor cleared up a few things for me, but I've not had time to make all of the necessary changes. I did find out how toString worked, so that's one question out of the way, and he gave us a lot of information for adding another class to generate random numbers.
    Again, thank you so much. I really want to learn this but I'm feeling so stupid right now. Any help you can give me about the above error message would be appreciated.

  • I need help on this program..

    import java.util.*;
    public class D3
    private static int[] z = new int[100000];
    private static int first=z[0];
    private static int last=z[n-1];
    private static int n=100000;
    public static void main(String args[])
    Scanner input=new Scanner(System.in);
    for(int i=0;i<z.length;i++)
    z=2*i;
    int seqSearch(z;50000;n); //method call 4 key where key=mid
    int binSearch(z;first;last;50000);
    int seqSearch(z;35467;n); //method call 4 key where key in the left half
    int binSearch(z;first;last;35467);
    int seqSearch(z;89703;n); //method call 4 key where key in the right half
    int binSearch(z;first;last;89703);
    public int seqSearch(int z[];int key;int n)
    long start = System.currentTimeMillis();
    int count=0;
    int ans=-1;
    for(int i=0;i<n;i++)
    if z=key
    count++
    {ans=i
    break;}
    return ans;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    public int binSearch(int z[];int first;int last;int key)
    long start = System.currentTimeMillis();
    int count=0;
    if(last><first){
    count++;
    index=-1;
    else
    count++;
    int mid=(first+last)/2
    if(ket=z[mid]{
    index=mid;
    else
    if(key><z[mid]){
    index = binSearch(z[];first;mid-1;key);
    else
    index=binSearch(z[];mid+1;last;key);
    return index;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    if anyone could please tell me whats wrong with my code i'd be greatful...the program is supposed to perform binary and sequential search on a sorted array of 100000 numbers.once on an item in the middle of the array once on the right side of it and once on the left side...i also need to count the number of basic operations for the same number in both sequential and binary to see whats better.and i need to check the time...i think the method call is wrong,not sure though...plz i need help.its not compiling and i dont know why..

    Just add new messages to a thread you've already created. Don't create a new thread each time.
    Anyway, look. This is wrong:int seqSearch(z;50000;n); //method call 4 key where key=midfor two reasons. The first is that leading "int"; it doesn't mean anything here. "int" is used to declare an integer variable, but you're not declaring a variable here, you're invoking a method. The second problem is that you're using semicolons to separate arguments in the method call, but actually commas are correct. You probably want something more like this:
    int result;
    result = seqSearch(z, 50000, n);  //method call 4 key where key=mid.
    Some more problems with your code: you're calling non-static methods in a static context (the main method is static and seqSearch isn't). You're also using "n" before you declare it, which is probably a problem.
    And this makes no sense:z=2*i;because you've declared z to be an array; you can't use the multiplication operator on an array. It's not clear really what you're trying to accomplish there.
    Here's what I want you to do. Take your code and completely remove the binSearch method. Just rip it out. Then in your main() method, take out all references to the binSearch method, and all references except for the first one of the seqSearch method. Fix the things I mentioned above.
    Then try to compile what you have. It won't compile. You will get error messages. That's OK. Just fix them and move on. If you don't understand an error message, ask on these forums (DON'T CROSSPOST), quoting the full error message and the relevant lines of code.
    After a couple hours, you'll fix the syntactical bugs, and your program will compile. Then you'll find that it compiles but the program doesn't work right. That's also OK. This is how computer programming works. It's part of the process. Don't panic. At that point, you can start trying to fix the program so it does what it's supposed to. Eventually you'll get it to work.
    Then, and only then add more invocations of the seqSearch method. They won't all work, probably. You'll find more bugs. That's OK. Just repeat the process of fixing them.
    When you've fixed those bugs, then, and only then, add the binSearch method. Repeat the process of fixing syntax and hunting down and fixing bugs.
    Then your program will work.

  • I need help with this program ( Calculating Pi using random numbers)

    hi
    please understand that I am not trying to ask anymore to do this hw for me. I am new to java and working on the assignment. below is the specification of this program:
    Calculate PI using Random Numbers
    In geometry the ratio of the circumference of a circle to its diameter is known as �. The value of � can be estimated from an infinite series of the form:
    � / 4 = 1 - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) + ...
    There is another novel approach to calculate �. Imagine that you have a dart board that is 2 units square. It inscribes a circle of unit radius. The center of the circle coincides with the center of the square. Now imagine that you throw darts at that dart board randomly. Then the ratio of the number of darts that fall within the circle to the total number of darts thrown is the same as the ratio of the area of the circle to the area of the square dart board. The area of a circle with unit radius is just � square unit. The area of the dart board is 4 square units. The ratio of the area of the circle to the area of the square is � / 4.
    To simuluate the throwing of darts we will use a random number generator. The Math class has a random() method that can be used. This method returns random numbers between 0.0 (inclusive) to 1.0 (exclusive). There is an even better random number generator that is provided the Random class. We will first create a Random object called randomGen. This random number generator needs a seed to get started. We will read the time from the System clock and use that as our seed.
    Random randomGen = new Random ( System.currentTimeMillis() );
    Imagine that the square dart board has a coordinate system attached to it. The upper right corner has coordinates ( 1.0, 1.0) and the lower left corner has coordinates ( -1.0, -1.0 ). It has sides that are 2 units long and its center (as well as the center of the inscribed circle) is at the origin.
    A random point inside the dart board can be specified by its x and y coordinates. These values are generated using the random number generator. There is a method nextDouble() that will return a double between 0.0 (inclusive) and 1.0 (exclusive). But we need random numbers between -1.0 and +1.0. The way we achieve that is:
    double xPos = (randomGen.nextDouble()) * 2 - 1.0;
    double yPos = (randomGen.nextDouble()) * 2 - 1.0;
    To determine if a point is inside the circle its distance from the center of the circle must be less than the radius of the circle. The distance of a point with coordinates ( xPos, yPos ) from the center is Math.sqrt ( xPos * xPos + yPos * yPos ). The radius of the circle is 1 unit.
    The class that you will be writing will be called CalculatePI. It will have the following structure:
    import java.util.*;
    public class CalculatePI
    public static boolean isInside ( double xPos, double yPos )
    public static double computePI ( int numThrows )
    public static void main ( String[] args )
    In your method main() you want to experiment and see if the accuracy of PI increases with the number of throws on the dartboard. You will compare your result with the value given by Math.PI. The quantity Difference in the output is your calculated value of PI minus Math.PI. Use the following number of throws to run your experiment - 100, 1000, 10,000, and 100,000. You will call the method computePI() with these numbers as input parameters. Your output will be of the following form:
    Computation of PI using Random Numbers
    Number of throws = 100, Computed PI = ..., Difference = ...
    Number of throws = 1000, Computed PI = ..., Difference = ...
    Number of throws = 10000, Computed PI = ..., Difference = ...
    Number of throws = 100000, Computed PI = ..., Difference = ...
    * Difference = Computed PI - Math.PI
    In the method computePI() you will simulate the throw of a dart by generating random numbers for the x and y coordinates. You will call the method isInside() to determine if the point is inside the circle or not. This you will do as many times as specified by the number of throws. You will keep a count of the number of times a dart landed inside the circle. That figure divided by the total number of throws is the ratio � / 4. The method computePI() will return the computed value of PI.
    and below is what i have so far:
    import java.util.*;
    public class CalculatePI
      public static boolean isInside ( double xPos, double yPos )
         double distance = Math.sqrt( xPos * xPos + yPos * yPos );        
      public static double computePI ( int numThrows )
        Random randomGen = new Random ( System.currentTimeMillis() );
        double xPos = (randomGen.nextDouble()) * 2 - 1.0;
        double yPos = (randomGen.nextDouble()) * 2 - 1.0;
        int hits = 0;
        int darts = 0;
        int i = 0;
        int areaSquare = 4 ;
        while (i <= numThrows)
            if (distance< 1)
                hits = hits + 1;
            if (distance <= areaSquare)
                darts = darts + 1;
            double PI = 4 * ( hits / darts );       
            i = i+1;
      public static void main ( String[] args )
        Scanner sc = new Scanner (System.in);
        System.out.print ("Enter number of throws:");
        int numThrows = sc.nextInt();
        double Difference = PI - Math.PI;
        System.out.println ("Number of throws = " + numThrows + ", Computed PI = " + PI + ", Difference = " + difference );       
    }when I tried to compile it says "cannot find variable 'distance' " in the while loop. but i thought i already declare that variable in the above method. Please give me some ideas to solve this problem and please check my program to see if there is any other mistakes.
    Thanks a lot.

    You've declared a local variable, distance, in the method isInside(). The scope of this variable is limited to the method in which it is declared. There is no declaration for distance in computePI() and that is why the compiler gives you an error.
    I won't check your entire program but I did notice that isInside() is declared to be a boolean method but doesn't return anything, let alone a boolean value. In fact, it doesn't even compute a boolean value.

  • I need help getting my Intuos5 to work with Flash CS6

    Can someone give me some help with this? I can't find a single thing on Google that helps me.
    I installed Adobe Flash CS6 recently and I have been using my Intuos5 Large for a long time now with Photoshop CS6. The thing is, with Photoshop, it took forever to get working properly. It turned out that I needed to use the 64-bit version because my 64-bit system and tablet drivers won't work with 32-bit Photoshop.
    Concerning Flash, it's the same problems as Photoshop. It refuses to recognize my tablets functions such as pressure and tilt sensitivity. It also has an annoying lag or lack of response if I do small, quick strokes. I would switch Flash to 64-bit mode, but there isn't one. I can't find the little stroke-like icon in Flash to turn on sensitivity either. I'm really confused. I've tried it with Flash CS5.5 and it's the same thing.
    That's my issue, and I have tried restarting the software and rebooting many times as well. There doesn't seem to be much for options. This all leads to it probably being a 64-bit and 32-bit compatability issue
    I'm running Windows 7 with more than enough power to maintain Flash CS6. It is possible that I may need to update my tablet driver since I did for Photoshop CS6, but it was a pain in the *** getting Photoshop to work until I used 64-bit mode. I may need additional files to mod the software.
    I would really appreciate the help so I can begin to learn animation. It's my passion. Thanks, in advance.
    Here are my relevant specs:
    System Information
    Time of this report: 9/4/2012, 01:32:48
           Machine name: LAPPY_TOPPY
       Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.120503-2030)
               Language: English (Regional Setting: English)
    System Manufacturer: TOSHIBA
           System Model: Satellite L675
                   BIOS: Phoenix SecureCore Version 2.30
              Processor: Intel(R) Core(TM) i5 CPU       M 450  @ 2.40GHz (4 CPUs), ~2.4GHz
                 Memory: 4096MB RAM
    Available OS Memory: 3954MB RAM
              Page File: 2016MB used, 5890MB available
            Windows Dir: C:\windows
        DirectX Version: DirectX 11
    DX Setup Parameters: Not found
       User DPI Setting: Using System DPI
    System DPI Setting: 96 DPI (100 percent)
        DWM DPI Scaling: Disabled
         DxDiag Version: 6.01.7601.17514 64bit Unicode
    Display Devices
              Card name: ATI Mobility Radeon HD 5650
           Manufacturer: ATI Technologies Inc.
              Chip type: ATI display adapter (0x68C1)
               DAC type: Internal DAC(400MHz)
             Device Key: Enum\PCI\VEN_1002&DEV_68C1&SUBSYS_FD001179&REV_00
         Display Memory: 2735 MB
       Dedicated Memory: 1014 MB
          Shared Memory: 1721 MB
           Current Mode: 1600 x 900 (32 bit) (60Hz)
           Monitor Name: Generic PnP Monitor
          Monitor Model: unknown
             Monitor Id: LGD01CA
            Native Mode: 1600 x 900(p) (60.080Hz)
            Output Type: Internal

    If you are moving from an existing Mac to a new Mac the easiest thing to do is connect the two Macs via a Firewire cable and run the Migration assistant. If you are moving files from a Windows platform or you don't want to use the Migration assistant review this article.
    http://docs.info.apple.com/article.html?artnum=300173

  • Need help getting these methods to work

    this program consists three seperate classes. i have two of the three working, i just can't figure out this one. here is my code, and the pseudo code for the methods. any help would be greatly appreciated. i am getting the following 18 errors
    CheckingAccountsTest.java:35: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    if(myFields[indexForAccountType].equals(CheckingAccount.getAccountType())){ //A-1-2-10
    ^
    CheckingAccountsTest.java:45: cannot find symbol
    symbol : constructor CheckingAccountPlus(java.lang.String,java.lang.String,java.lang.String,double)
    location: class CheckingAccountPlus
    CheckingAccountPlus currentAccount = new CheckingAccountPlus(myFields[indexForAccountId], //A-1-2-17 THROUGH A-1-2-20
    ^
    CheckingAccountsTest.java:72: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount.getAccountId().equals(myFields[indexForAccountId]); //A-1-3-06
    ^
    CheckingAccountsTest.java:124: cannot find symbol
    symbol : method makeDeposit(double)
    location: class CheckingAccountPlus
    currentAccount.makeDeposit(amount); //A-1-6-02
    ^
    CheckingAccountsTest.java:161: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:161: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:167: non-static method getAccountType() cannot be referenced from a static context
    currentAccount, currentAccount.getAccountId(), CheckingAccountPlus.getAccountType(), currentAccount.getBalance());
    ^
    CheckingAccountsTest.java:171: getAccountId(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
    ^
    CheckingAccountsTest.java:171: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
    ^
    CheckingAccountsTest.java:172: getBeginningBalance(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:172: getDeposits(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:172: getWithdrawals(double) in CheckingAccount cannot be applied to ()
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
    ^
    CheckingAccountsTest.java:173: getFees(double) in CheckingAccount cannot be applied to ()
    currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    ^
    CheckingAccountsTest.java:173: getOverdrafts(double) in CheckingAccount cannot be applied to ()
    currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    ^
    CheckingAccountsTest.java:178: getAccountType(java.lang.String) in CheckingAccount cannot be applied to ()
    System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-12-01
    ^
    CheckingAccountsTest.java:179: cannot find symbol
    symbol : method getBeginningBalance()
    location: class CheckingAccountPlus
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
    ^
    CheckingAccountsTest.java:179: cannot find symbol
    symbol : method getDeposits()
    location: class CheckingAccountPlus
    currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
    ^
    CheckingAccountsTest.java:180: cannot find symbol
    symbol : method getSumOfCreditCardAdvances()
    location: class CheckingAccountPlus
    currentAccount.getBalance(), currentAccount.getSumOfCreditCardAdvances(), " *"); //A-1-12-03 THROUGH A-1-12-04
    ^
    18 errors
    Process completed.
    public class CheckingAccountsTest
         private static final int indexForAccountId = 0;
         private static final int indexForAccountType = 2;
         private static final int indexForBalance = 5;
         private static final int indexForDepositAmount = 2;
         private static final int indexForFirstName = 3;
         private static final int indexForLastName = 4;
         private static final int indexForRecordType = 1;
         private static final int indexForWithdrawalAmount = 2;
         private static final String recordTypeForDeposit = "CKD";
         private static double sumOfBeginningBalances = 0.0;
         private static double sumOfCreditCardAdvances = 0.0;
         private static double sumOfDeposits = 0.0;
         private static double sumOfEndingBalances = 0.0;
         private static double sumOfFees = 0.0;
         private static double sumOfOverdrafts = 0.0;
         private static double sumOfWithdrawals = 0.0;
    public static void main(String args[])
         MyCsvFile myFile = new MyCsvFile("monthlyBankTransactions,v05.txt"); //A-1-2-01 THRU A-1-2-02
         System.out.println("\nBig Bank: Monthly Checking Account Activity\n"); //A-1-2-04
         System.out.println("----------- Account ----------- Beginning\t\t    With-\t\t   Ending\tOver-\tCredit Cd"); //A-1-2-05
         System.out.println("     Name\t   Id    Type\t Balance   +   Deposit   -  drawal   -    Fee   =  Balance\tdraft\t Advance\n"); //A-1-2-06
         myFile.readARecord(); //A-1-2-07
         while(myFile.getEofFound() == false) //A-1-2-08
              String []myFields = myFile.getCsvRecordFieldArray();//A-1-2-09
              if(myFields[indexForAccountType].equals(CheckingAccount.getAccountType())){ //A-1-2-10
             CheckingAccount currentAccount = new CheckingAccount(myFields[indexForAccountId], //A-1-2-11 THROUGH A-1-2-12
             myFields[indexForFirstName], myFields[indexForLastName],
             Double.parseDouble(myFields[indexForBalance])); //A-1-2-13
             handleAccount(currentAccount, myFile, myFields); //A-1-2-14
             currentAccount = null;// A-1-2-15
        else//A-1-2-16
             CheckingAccountPlus currentAccount = new CheckingAccountPlus(myFields[indexForAccountId], //A-1-2-17 THROUGH A-1-2-20
             myFields[indexForFirstName], myFields[indexForLastName], Double.parseDouble(myFields[indexForBalance]));
             handleAccount(currentAccount, myFile, myFields);
             currentAccount = null; //A-1-2-21
        }//end if A-1-2-22
    }//end while A-1-2-23
         System.out.printf("Report Totals", sumOfBeginningBalances,sumOfDeposits, //A-1-2-24
         sumOfWithdrawals, sumOfFees, sumOfEndingBalances, sumOfOverdrafts, sumOfCreditCardAdvances, "**"); //A-1-2-25
         System.out.printf("The information in the above report is from the 17 records in the following file:",
         myFile.getCountOfRecords());                                                                           //A-1-2-26
         System.out.printf("Path to file:", myFile.getFilePath()); //A-1-2-27
         System.out.printf("Name of file:", myFile.getFileName()); //A-1-2-28
         System.out.println("\nEnd of program"); //A-1-2-29
    }// end main method
    public static void handleAccount(CheckingAccount currentAccount, MyCsvFile myFile, String []myFields)
         sumOfBeginningBalances += currentAccount.getBalance(); //A-1-3-01
         printBeginningBalance(currentAccount); // A-1-3-02
         myFile.readARecord(); //A-1-3-03
         myFields = myFile.getCsvRecordFieldArray(); //A-1-3-04
    while (myFile.getEofFound() == false) //A-1-3-05
       currentAccount.getAccountId().equals(myFields[indexForAccountId]); //A-1-3-06
    if(myFields[indexForRecordType].equals(recordTypeForDeposit)){ //A-1-3-07
         handleDeposit(currentAccount, Double.parseDouble(myFields[indexForDepositAmount])); //A-1-3-08 THROUGH A-1-3-09
          else //A-1-3-10
          handleWithdrawal(currentAccount,Double.parseDouble(myFields[indexForWithdrawalAmount])); //A-1-3-11 THROUGH A-1-3-12
       }//end if //A-1-3-13
    myFile.readARecord();//A-1-3-14
    myFields = myFile.getCsvRecordFieldArray(); //A-1-3-15 THROUGH A-1-3-16
    }//end while //A-1-3-17
    sumOfEndingBalances += currentAccount.getBalance();//A-1-3-18
    printEndingBalance(currentAccount); //A-1-3-19
    public static void handleAccount(CheckingAccountPlus currentAccount, MyCsvFile myFile, String [] myFields)
    sumOfBeginningBalances += currentAccount.getBalance(); //A-1-4-01
    printBeginningBalance(currentAccount); //A-1-4-02
    myFile.readARecord(); //A-1-4-03
    myFields = myFile.getCsvRecordFieldArray(); //A-1-4-04
      while (myFile.getEofFound()==false) //A-1-4-05
    currentAccount.getAccountId().equals (myFields[indexForAccountId]); //A-1-4-06
    if(myFields[indexForRecordType].equals(recordTypeForDeposit)){ //A-1-4-07
         handleDeposit(currentAccount, Double.parseDouble(myFields[indexForDepositAmount])); //A-1-4-08 THROUGH //A-1-4-09
          else //A-1-4-10
          handleWithdrawal(currentAccount,Double.parseDouble(myFields[indexForWithdrawalAmount])); //A-1-4-11 THROUGH A-1-4-12
       }//end if A-1-4-13
    myFile.readARecord(); //A-1-4-14
    myFields = myFile.getCsvRecordFieldArray(); //A-1-4-15 THROUGH A-1-4-16
    }//end while A-1-4-17
    sumOfEndingBalances += currentAccount.getBalance(); //A-1-4-18
    printEndingBalance(currentAccount); //A-1-4-19
    private static void handleDeposit(CheckingAccount currentAccount, double amount)
    sumOfDeposits += amount; //A-1-5-01
    currentAccount.makeDeposit(amount); //A-1-5-02
    System.out.printf("$,%.2f", amount); //A-1-5-03
      private static void handleDeposit(CheckingAccountPlus currentAccount, double amount)
      sumOfDeposits += amount;//A-1-6-01
      currentAccount.makeDeposit(amount); //A-1-6-02
      System.out.printf("$,%.2f", amount); //A-1-6-03
      private static void handleWithdrawal(CheckingAccount currentAccount, double amount)
      if (currentAccount.makeWithdrawal(amount) == true){ //A-1-7-01
       sumOfWithdrawals += amount; //A-1-7-02
       System.out.printf("$,%.2f", amount); //A-1-7-03
      }else{ //A-1-7-04
       double overdraftFee = currentAccount.getOverdraftFee(); //A-1-7-05
       sumOfFees += overdraftFee; //A-1-7-06
       sumOfOverdrafts += amount; //A-1-7-07
       System.out.printf("$,%.2f",overdraftFee, amount); //A-1-7-08
      }//end if A-1-7-09
      private static void handleWithdrawal(CheckingAccountPlus currentAccount, double amount)
           if (currentAccount.makeWithdrawal(amount) == true){ //A-1-8-01
            sumOfWithdrawals += amount; //A-1-8-02
            System.out.printf("$,%.2f",amount); //A-1-8-03
      }else{ //A-1-8-04
       double creditCardAdvance = currentAccount.getCreditCardAdvance(); //A-1-8-05 THROUGH A-1-8-06
       sumOfCreditCardAdvances += creditCardAdvance; //A-1-8-07
       sumOfWithdrawals += currentAccount.getActualWithdrawal(); //A-1-8-08
       System.out.printf("$,%.2f",currentAccount.getActualWithdrawal(),creditCardAdvance); //A-1-8-09
      }//end if //A-1-8-10
    private static void printBeginningBalance(CheckingAccount currentAccount)
    System.out.printf("",   //A-1-9-01 THROUGH A-1-9-02
       currentAccount, currentAccount.getAccountId(), CheckingAccount.getAccountType(), currentAccount.getBalance());
    private static void printBeginningBalance(CheckingAccountPlus currentAccount)
    System.out.printf("",   //A-1-10-01 TROUGH A-1-10-02
       currentAccount, currentAccount.getAccountId(), CheckingAccountPlus.getAccountType(), currentAccount.getBalance());
    private static void printEndingBalance(CheckingAccount currentAccount)
      System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-11-01
        currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-11-02
        currentAccount.getFees(), currentAccount.getBalance(), currentAccount.getOverdrafts(), " *"); //A-1-11-03 THROUGH A-1-11-04
    private static void printEndingBalance(CheckingAccountPlus currentAccount)
      System.out.printf("Account Totals", currentAccount.getAccountId(), CheckingAccount.getAccountType(), //A-1-12-01
        currentAccount.getBeginningBalance(), currentAccount.getDeposits(), currentAccount.getWithdrawals(), //A-1-12-02
        currentAccount.getBalance(), currentAccount.getSumOfCreditCardAdvances(), " *"); //A-1-12-03 THROUGH A-1-12-04
    }PSEUDO CODE FOR ALL METHODS
    This public static method has no return value and has one parameter of type String named args[ ], an array
    A-1-2-01)     INSTANTIATE a local variable named myFile of class MyCsvFile, passing a single String argument for the CSV filename:
    A-1-2-02)          ?monthlyBankTransactions,v05.txt?
    A-1-2-03)     DISPLAY the task / programmer identification line
    A-1-2-04)     DISPLAY the ?Big Bank: Monthly Checking Account Activity? title line
    A-1-2-05)     DISPLAY the first column heading line: ?---------- Account ----------??
    A-1-2-06)     DISPLAY the second column heading line: ? Name Id??
    A-1-2-07)     Get 1st record from CSV file using method readARecord: MyCsvFile class: myFile.readARecord()
    A-1-2-08)     WHILE (myFile.getEofFound() IS FALSE)
    A-1-2-09)          DEFINE a String Array named myFields, and ASSIGN it the value myFile.getCsvRecordFieldArray()
    A-1-2-10)          IF (myFields[indexForAccountType].equals(CheckingAccount.getAccountType()))
    A-1-2-11)               INSTANTIATE a local variable named currentAccount of class CheckingAccount, passing the following arguments:
    A-1-2-12)                    myFields[indexForAccountId], myFields[indexForFirstName], myFields[indexForLastName],
    A-1-2-13)                    Double.parseDouble(myFields[indexForBalance])
    A-1-2-14)               CALL method handleAccount of this class, passing the following arguments: currentAccount, myFile, myFields
    A-1-2-15)               ASSIGN null TO currentAccount
    A-1-2-16)          ELSE
    A-1-2-17)     INSTANTIATE a local variable named currentAccount of class CheckingAccountPlus, passing the following arguments:
    A-1-2-18)          myFields[indexForAccountId], myFields[indexForFirstName], myFields[indexForLastName],
    A-1-2-19)          Double.parseDouble(myFields[indexForBalance])
    A-1-2-20)     CALL method handleAccount of this class, passing the following arguments: currentAccount, myFile, myFields
    A-1-2-21)               ASSIGN null TO currentAccount
    A-1-2-22)          END IF
    A-1-2-23)     END WHILE
    A-1-2-24)     DISPLAY the report-total line using the following arguments: ?Report Totals?, sumOfBeginningBalances, sumOfDeposits,
    A-1-2-25)          sumOfWithdrawals, sumOfFees, sumOfEndingBalances, sumOfOverdrafts, sumOfCreditCardAdvances and ?**?
    A-1-2-26)     DISPLAY the ?The information in the above report? line with the following arguments: myFile.getCountOfRecords()
    A-1-2-27)     DISPLAY the ?Path to file? line with the following arguments: myFile.getFilePath()
    A-1-2-28)     DISPLAY the ?Name of file? line with the following arguments: myFile.getFileName()
    A-1-2-29)     DISPLAY the ?End of program? line
    This private static method has no return value, and has three parameters: currentAccount of type CheckingAccount, myFile of type MyCsvFile and myFields of type String array.
    A-1-3-01)     CALL method currentAcccount.getBalance and ADD its return value to sumOfBeginningBalances
    A-1-3-02)     CALL method printBeginningBalance with the following argument list: currentAccount
    A-1-3-03)     CALL method myFile.readARecord, which reads the 1st record after the Balance record (a deposit or withdrawal) for the current customer
    A-1-3-04)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the values from the
    A-1-3-05)          fields in the record just read available for access as elements in the myFields string array
    A-1-3-06)     WHILE (myFile.getEofFound() IS FALSE AND currentAccount.getAccountId().equals(myFields[indexForAccountId]))
    A-1-3-07)          IF (myFields[indexForRecordType].equals(recordTypeForDeposit))
    A-1-3-08)               CALL method handleDeposit with the following argument list: currentAccount,
    A-1-3-09)                    Double.parseDouble(myFields[indexForDepositAmount]
    A-1-3-10)          ELSE
    A-1-3-11)               CALL method handleWithdrawal with the following argument list: currentAccount,
    A-1-3-12)                    Double.parseDouble(myFields[indexForWithdrawalAmount]
    A-1-3-13)          END IF
    A-1-3-14)          CALL method myFile.readARecord, which reads the next deposit or withdrawal record, if any, for this customer
    A-1-3-15)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the value from the
    A-1-3-16)          fields in the record just read available for access as elements in the myFields string array
    A-1-3-17)     END WHILE
    A-1-3-18)     CALL method currentAcccount.getBalance and ADD its return value to sumOfEndingBalances
    A-1-3-19)     CALL method printEndingBalance with the following argument list: currentAccount
    This private static method has no return value, and has three parameters: currentAccount of type CheckingAccountPlus, myFile of type MyCsvFile and myFields of type String array.
    A-1-4-01)     CALL method currentAcccount.getBalance and ADD its return value to sumOfBeginningBalances
    A-1-4-02)     CALL method printBeginningBalance with the following argument list: currentAccount
    A-1-4-03)     CALL method myFile.readARecord, which reads the 1st record after the Balance record (a deposit or withdrawal) for the current customer
    A-1-4-04)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the values from the
    A-1-4-05)          fields in the record just read available for access as elements in the myFields string array
    A-1-4-06)     WHILE (myFile.getEofFound() IS FALSE AND currentAccount.getAccountId().equals(myFields[indexForAccountId]))
    A-1-4-07)          IF (myFields[indexForRecordType].equals(recordTypeForDeposit))
    A-1-4-08)               CALL method handleDeposit with the following argument list: currentAccount,
    A-1-4-09)                    Double.parseDouble(myFields[indexForDepositAmount]
    A-1-4-10)          ELSE
    A-1-4-11)               CALL method handleWithdrawal with the following argument list: currentAccount,
    A-1-4-12)                    Double.parseDouble(myFields[indexForWithdrawalAmount]
    A-1-4-13)          END IF
    A-1-4-14)          CALL method myFile.readARecord, which reads the next deposit or withdrawal record, if any, for this customer
    A-1-4-15)     CALL method myFile.getCsvRecordFieldArray and ASSIGN its return value to myFields, a String array. This makes the value from the
    A-1-4-16)          fields in the record just read available for access as elements in the myFields string array
    A-1-4-17)     END WHILE
    A-1-4-18)     CALL method currentAcccount.getBalance and ADD its return value to sumOfEndingBalances
    A-1-4-19)     CALL method printEndingBalance with the following argument list: currentAccount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccount and amount of type double.
    A-1-5-01)     ADD amount TO sumOfDeposits
    A-1-5-02)     CALL method currentAccount.makeDeposit, passing it the following arguments: amount
    A-1-5-03)     DISPLAY the deposit line using the following arguments: amount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccountPlus and amount of type double.
    A-1-6-01)     ADD amount TO sumOfDeposits
    A-1-6-02)     CALL method currentAccount.makeDeposit, passing it the following arguments: amount
    A-1-6-03)     DISPLAY the deposit line using the following arguments: amount
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccount and amount of type double.
    A-1-7-01)     IF (currentAccount.makeWithdrawal(amount) IS TRUE)
    A-1-7-02)          ADD amount TO sumOfWithdrawals
    A-1-7-03)          DISPLAY the withdrawal line using the following arguments: amount
    A-1-7-04)     ELSE
    A-1-7-05)          DEFINE variable overdraftFee of type double and ASSIGN it the value returned from a call of method currentAccount.getOvedraftFee
    A-1-7-06)          ADD overdraftFee TO sumOfFees
    A-1-7-07)          ADD amount TO sumOfOverdrafts
    A-1-7-08)          DISPLAY the overdraft line using the following arguments: overdraftFee, amount
    A-1-7-09)     END IF
    This private static method has no return value, and has two parameters: currentAccount of type CheckingAccountPlus and amount of type double.
    A-1-8-01)     IF (currentAccount.makeWithdrawal(amount) IS TRUE)
    A-1-8-02)          ADD amount TO sumOfWithdrawals
    A-1-8-03)          DISPLAY the withdrawal line using the following arguments: amount
    A-1-8-04)     ELSE
    A-1-8-05)          DEFINE variable creditCardAdvance of type double and ASSIGN it the value returned from a call of method
    A-1-8-06)               currentAccount.getCreditCardAdvance
    A-1-8-07)          ADD creditCardAdvance TO sumOfCreditCardAdvances
    A-1-8-08)          ADD currentAccount.getActualWithdrawal() TO sumOfWithdrawals
    A-1-8-09)          DISPLAY the credit-card-advance line using the following arguments: currentAccount.getActualWithdrawal(),creditCardAdvance
    A-1-8-10)     END IF
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccount.
    A-1-9-01)     DISPLAY the beginning balance line using the following arguments: currentAccount , currentAccount.getAccountId(),
    A-1-9-02)          currentAccount.getAccountType() and currentAccount.getBalance()
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccountPlus.
    A-1-10-01)     DISPLAY the beginning balance line using the following arguments: currentAccount , currentAccount.getAccountId(),
    A-1-10-02)          currentAccount.getAccountType() and currentAccount.getBalance()
    This private static method has no return value, and has one parameter: currentAccount of type CheckingAccount.
    A-1-11-01)     DISPLAY the ending balance line using the following arguments: ?Account Totals,? currentAccount.getAccountId(),
    A-1-11-02)          currentAccount.getAccountType(), currentAccount.getBeginningBalance(), currentAccount.getDeposits(),
    A-1-11-03)          currentAccount.getWithdrawals(), currentAccount.getFees(), currentAccount.getBalance() and
    A-1-11-04)          currentAccount.getOverdrafts(), ?? *?

    You're calling a bunch of methods and constructors with the wrong arguments, or missing arguments. Take the errors one by one, and look at the method you're being told you're calling, and check that the arguments you're using are right

  • I need help getting Mini Bridge to work in PS CS6

    I have already tried deleting the folder and rebooting the computer, I have tried creating a new user account, I have tried uninstalling and reinstalling the entire package and I cannot get Mini Bridge to work at all. It just keeps going to "Mini Bridge waiting for Bridge CS6..." and then never finds anything. I am having this issue on both my Macbook Pro Retina 15 and my MacBook Pro 13 (Early 2011 model). I cannot seem to find any other solutions to this problem online. I also made sure that both Macbooks are fully updated as well as all CS6 software titles. Please help me fix this!
    I also made sure I added it to the exceptions list in the firewall too.

    Moving the discussion to PS forum
    You can also follow the solution suggested in http://helpx.adobe.com/photoshop/kb/error-waiting-for-bridge-cs5.html
    they may help

  • Need help getting my MacBook to work a with a D-Link print server

    I'm trying to set up my MacBook Pro running OS X Ver 10.4.11 to print to a HP PSC 2210 All in One printer attached to a D-Link DP-301U print server. I'm actualy a Windows user and set this up and it works fine on the Windows side. My brother in law here is the Mac user and I can't seem to get this going.
    I did install Gimp Print Ver 4.2 and the printer is listed as a support device at their website. But, the printer model doesn't appear in the list when I try and add the IP printer. I did try a LaserJet 4l driver and DeskJet 860c - they don't work. In the print queue, the status says "Network host '<IP address of D-Link> is busy; will retry in 30 seconds."
    Any ideas? D-Link support was horrible, claiming that they don't support Macs - despite what it says on the box.
    Any insights on next steps would be appreciated.
    TIA

    Thanks, Greg. GutenPrint lists it as a supported printer but as I said, I don't see it. I'll try the other site.
    There is some stuff on Macs at teh D-Link site, but its not verry useful. But, re: the queue, name it appears to me that the PS-<servername>-P1 convention comes from a print server with a parallel interface and this is the LPT port name. This is a USB printer and that's why we get the PSC2210 name which I think is the Windows name I gave the Printer. At any rate, the D-Link doc claims that you should leave the queue name blank for a single port server. I beleive that the issue is that this is not a postscript printer which hopefully I can get at the alternate site.
    I am curious why this is different on a Mac than in Windows. If the printer works if direct connected, why does the Mac OS need the special drivers to extend the connection through a network? I'm curious as I mooonlight setting up home networks and I don't want to be a "windows only" solution. Oh, and would this work on the Mac if I had selected an Apple print server or wireless router with printer port built in?
    Thanks again.

  • Need help on this program

    Hi all,
    The purpose of this program is listed in here:
    // Inputs the miles driven and gallons used (both integers) for each tankful.
    // Calculates and displays miles per gallon obtained for each tankful and print
    // the combined miles per gallon obtained for all tankfuls up to this point.
    // All results should be floating point. Use Scanner and sentinel-controlled
    // repetition to obtain data from the user.
    // Exercise 4.17 MPG.java
    import java.util.Scanner;
    public class MPG
    private int milesDriven;
    private int gallonsUsed;
    private float result;
    public void setMilesDriven( int miles )
    milesDriven = miles;
    public void setGallonsUsed( int gallons )
    gallonsUsed = gallons;
    public String getMilesDriven( int miles )
    return milesDriven; // error occurs here
    public String getGallonsUsed( int gallons )
    return gallonsUsed;
    public MPG( float result )
    result = gallons * miles;
    System.out.printf( result);
    I try to compile this program, but the error I get is "incompatible types-found int but expected java.lang.String." How do I fix this, and how do I
    use sentinel control? If you can help me with these two things, I'd appreciate it. The sooner you can help me, the better.

    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    I try to compile this program, but the error I get is
    "incompatible types-found int but expected
    java.lang.String." That means you provided an int where the program expected a string. Just like it says.
    How do I fix this,Either provide a String instead of the int, or change the code that's expecting a String to operate on an int instead.
    and how do I
    use sentinel control? II assume the instructor just wants a flag that indicates whether you're done or not. If the user enters "quit" or whatever, set that flag to true. The loop control ( while(whatever), for example) checks the flag, and either enters the loop or not.
    The sooner you can
    help me, the better.I'd advise you to keep comments like this out of your future posts. Nobody here cares about your timetable. We answer questions on our own schedule, and comments like that, and "urgent" and "asap" just annoy people.

  • Need help getting guest access to work.

    I have searched and Googled and found very little about enabling temporary guest access on an AEBS.
    What I could find said just type in "the PIN number." OK, what PIN number? It appears that the device seeking access is supposed to supply it somehow and then I type it in while using the Airport Utility. I see no such number on the device. I also tried the "first one to try" method and got nowhere.
    In both cases I was using an iPhone that wanted to use my network. Does this work with iPhones?
    Many thanks,
    -dan

    This thread http://discussions.apple.com/thread.jspa?messageID=4088108&#4088108 looked helpful but I can't get guest access to work for my son's guest using a Dell XP laptop (using Dell wireless management) despite allowing timed access. Neither the PIN nor the first attempt option allowed him on the network without giving him our password.
    It's still not clear if or when this will work. At the very least, the documentation is terrible.

  • Need help getting LCD monitor to work with G4 GeForce4 MX

    I have a G4 that I haven't been using and want to get running again. It has a Nvidia GeForce4 MX video card. I had a huge CRT monitor and want to use a ViewSonic VX1935wm which I got a deal on. When I hook the monitor up it says that the resolution is out of range.
    I can boot with my old monitor and change the connection and then get the LCD to work but only at certain resolutions.
    Do I need to get a new video card, or can I get an adaptor? What kind of card should I get if it needs to be replaced? Or what other kind of monitor would be supported by this video card?
    Here is the webpage for this monitor: http://www.viewsonic.com/products/lcddisplays/xseries/vx1935wm/

    thanks for the links.
    switchResX does something, but it doesn't solve the problem. i can now switch to the "optimum" resolution of 1440x900, 60hz. but when i restart the computer, it still won't work! i continue to get the "out of range" message and have to boot with my crt and then switch cables to do anything. also, the fonts in the finder menus look terrible, you can see the jagged lines.
    displayConfigX won't let me test that high of a resolution without registering the product.. needless to say, i don't want to pay money if the results are going to be the same as with SwitchResX.
    I sent an e-mail to ViewSonic support. Is it typical to have these problems? I am getting more and more confused as I learn more about this.

Maybe you are looking for

  • Compilation failed while executing : compile-abc

    This is with the latest AIR 4.0 beta, dated 12/17, with "-useLegacyAOT no" on Mac, OS X 10.9. 0  compile-abc              0x0095d728 PrintStackTrace(void*) + 40 1  compile-abc              0x0095dba1 SignalHandler(int) + 449 2  libsystem_platform.dyl

  • Qosmio G20-126 where can i buy DVD Super Multi drive (Double Layer) ?

    Hi, Can someone help me and tell me where can i buy DVD Super Multi drive (Double Layer) DVD model: UJ-846-C flop in 12.7mm Qosmio g20-126 Thank you

  • Current number in number range

    Hi all, I have created an info record and the number for the same is internally generated (******163). But I find that the current number (******169) in the Define Number range for info records (OMEO) and the number generated are not the same. There

  • Delivered quantity error when using MBST to reverse a MIGO

    We have a user who goes into MBST to reverse a transaction and she is not able to, gets the following error: Delivered quantity 1,015 EA for acct assgmt 4500012817 00010 01 falls short by 0 EA She is actually trying to reverse the quantity of 2900 on

  • Can I use iDVD to create a project to burn on a Windows PC?

    I might be needing to create a DVD for a job I am applying for. I have a 12" iBook with just a combo drive. My Mom's Gateway computer does have a DVD burner. I'm wondering if it would be possible to transfer over the iDVD project to her computer and