Search:

Type: Posts; User: Usoda

Search: Search took 0.30 seconds.

  1. Replies
    0
    Views
    471

    [SOLVED] Traversing two different linked list

    I have a Product class that is the parent of 3 other classes; Books, Movies, Music. And the Product class connects to the Store class that holds the Store's location.

    If I need to find a certain...
  2. Replies
    3
    Views
    1,991

    [SOLVED] Re: Linked List (adding alphabetically)

    Still unsure how to implement what you said; however, I am going to try and make sense of what I am misunderstanding. If you need more code I can provide it.

    My first pass would take in a Store...
  3. Replies
    3
    Views
    1,991

    [SOLVED] Linked List (adding alphabetically)

    Hello, I am trying to add String objects into a linked list alphabetically. However, when I put multiple strings in and go to print it it will only print the first thing I input; losing the rest of...
  4. Replies
    7
    Views
    910

    [SOLVED] Re: Card Program"War" Class help

    I am not strongly familiar with ArrayList. As for what I mean as top and bottom I am looking at it as a playing deck of cards sitting on a table. 52 total. Where the top of the deck; if set on the...
  5. Replies
    7
    Views
    910

    [SOLVED] Re: Card Program"War" Class help

    It would be taking away from the top or beginning (index 0) which is in my Draw() method. Then if needed adding cards to the bottom of a deck of cards which could contain x amount
  6. Replies
    7
    Views
    910

    [SOLVED] Re: Card Program"War" Class help

    I understand that i need a counter to do that; however, I don't know where to set the counter so that it can determine that empty spot. Where exactly it should be pointing within the method, class,...
  7. Replies
    7
    Views
    910

    [SOLVED] Card Program"War" Class help

    Hello, I am having trouble with a few methods in one of my classes (Deck)

    I have 2 classes; Deck & Cards

    Two methods in Deck that I am unsure how to create is;

    "add" which is suppose to...
  8. Replies
    9
    Views
    1,016

    [SOLVED] Re: Linear array search(without Arraylist)

    Sorry guys it isn't suppose to RETURN anything.. However it is suppose to have print statements for the user inside the method as requested by the instructor. This quote below, as posted before - I...
  9. Replies
    9
    Views
    1,016

    [SOLVED] Re: Linear array search(without Arraylist)

    This is my working code. It works for what I have tested it for, but I am not sure if I have ran all the conditions for it too pass. Other than that I believe this is solved. Unless you guys see...
  10. Replies
    9
    Views
    1,016

    [SOLVED] Re: Linear array search(without Arraylist)

    All i need to do is somehow stop the loop from printing my else statement if IF is true. It will run through both if and else and print them and will print only my IF when it finds the index?
  11. Replies
    9
    Views
    1,016

    [SOLVED] Linear array search(without Arraylist)

    I have a method that is SUPPOSE to prompt the user to enter the name of the item to search for. If it exist then say it was found and return the index number. if it doesn't then tell them it doesn't....
  12. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    Alright I finished my program however, I need a counter for words. The program below counts words that end with a space.

    I need to do an || statement or a different loop to count words that also...
  13. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    I didn't know you had to assign it. I thought char currentChar; would be all you had to do to initialize it. I guess I was wrong though.
  14. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    Hey man I feel yeah. I got another error:

    The local variable currentChar may not have been initialized

    I am going to take a break because I am becoming frustrated, and can't stand to stare at...
  15. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    Sorry to be so bothersome, but now it is saying:

    The method isWhitespace(char) in the type java.lang.Character is not applicable for the arguments ()

    I don't understand why it is trying to...
  16. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    Tjstretch with your method I get an error "Cannot invoke isDigit on the primitive type char?" on both isDigit and isWhitespace
  17. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    Tjstretch I have not read your post yet. I just now created this which counts everything, but it doesn't combine the values.

    while (input.hasNextLine()) {

    last = input.nextLine();
    ...
  18. Replies
    20
    Views
    1,515

    [SOLVED] Re: Nested Loops & Processing Strings

    I am still unsure how to increment a counter to tell me how many characters, digits, and blank spaces. Also, is there a way to do this with methods from class Character?
  19. Replies
    20
    Views
    1,515

    [SOLVED] Nested Loops & Processing Strings

    I am reading a file from the user and now I have to count the number of characters, blank spaces, digits, "other characters", words, and lines in a text file using a loop.

    I am having trouble...
  20. Replies
    7
    Views
    981

    [SOLVED] Re: Replace String Method? Noobie :/

    Output:

    I love ____, but hate ____:
    [DrJava Input Box]
    Original line of text:
    i love cats but hate dogs
    The word hate is replaced with love:
    i hate cats but love dogs
    First word of...
  21. Replies
    7
    Views
    981

    [SOLVED] Re: Replace String Method? Noobie :/

    import java.util.Scanner;

    class Hate
    {
    public static void main (String args[])
    {
    String Original;
    String Modified;

    int love;
  22. Replies
    7
    Views
    981

    [SOLVED] Replace String Method? Noobie :/

    This is a program to change the first word in a user input sentence with the last.

    I am extremely sorry if this is a simple fix but I either get a repeated String or a printout error. I have...
Results 1 to 22 of 22