Search:

Type: Posts; User: BuhRock

Page 1 of 2 1 2

Search: Search took 0.13 seconds.

  1. Replies
    1
    Views
    400

    Polymorphism Question

    I have this question on my study guide, and I'm not even sure how to begin to answer it.

    " When sorting a collection of objects that implements the Comparable type, the sorting method compares and...
  2. Thread: Java salaries

    by BuhRock
    Replies
    2
    Views
    1,736

    Java salaries

    So I want to know from someone who actually has a job programming or has had, what a realistic salary for a java programmer is?

    I'm in college now and I'm concerned about what my future holds. I...
  3. Replies
    4
    Views
    1,436

    Re: Checkout line Simulation

    What should I do then in order to get help because I really am at a point where I'm not sure what my next step? I realize I have a lot of code here, but I can't help that.
  4. Replies
    4
    Views
    1,436

    Re: Checkout line Simulation

    I never asked for a handout of code. I obviously have done the work here. I told you what was asked. Everything I typed above, has been implemented other than the GUI part. I said I don't know how to...
  5. Replies
    4
    Views
    1,436

    Checkout line Simulation

    So I have to program this MVC GUI of a checkout line. I have a gui that has 10 registers. Each register has a queue of customers. There is a button that when clicked, will generate a customer and the...
  6. Replies
    4
    Views
    3,075

    Re: Images in GridLayout

    I got it working, but I need the register icon to display at the top of each column. By doing new GridLayout(12,10) , that is 12 rows, 10 columns?




    import java.awt.BorderLayout;
    import...
  7. Replies
    4
    Views
    3,075

    Images in GridLayout

    So, I wanna display a little image of a register at the top of each column to display a checkout line. I can't seem to get the Icon to show. What's wrong here? I've followed the example in my book...
  8. Replies
    7
    Views
    389

    Re: Priority Queue help

    So I have to take a step back. I can't use a Priority Queue for my customers. My professor said not to. I'll just use a LinkedList Queue for the customer line.

    Do I still need the comparable and...
  9. Replies
    7
    Views
    389

    Re: Priority Queue help

    I guess what I'm confused on, is how to instantiate the registers. The constructor of my store class creates ten registers. So in my temporary tester class, do I even need to do this:

    Register reg...
  10. Replies
    7
    Views
    389

    Re: Priority Queue help

    Yes, I suppose it works, it printed out the double that the customer has when its created.. I made a class and added a customer to a register. I just need help on how to add customers to different...
  11. Replies
    7
    Views
    389

    Re: Priority Queue help

    Would this work?


    double totalTime = 0;

    for(Customer cust: line ){
    totalTime +=cust.getServiceTime();

    }
  12. Replies
    7
    Views
    389

    Priority Queue help

    So I have to implement a checkout line using a priority queue. I'm really stuck. I have 3 classes, a Register class, Store class, and customer class.

    Each customer has a service time which is the...
  13. Replies
    3
    Views
    557

    Re: Linked List Help

    I'm not sure if the methods I have written are correct. I also don't know how to solve the others.
  14. Replies
    3
    Views
    557

    Linked List Help

    So, I have to implement a linked-list to create a collection. I have to create the add, remove, union, equals, contains, isEmpty, size, and iterator method. I also have to implement an interface....
  15. Re: String Formatting on JOptionPane.showMessageDialog

    Could you not use the StringBuffer class to append the into to the string? Then just put the String variable in the dialogbox, instead of calling a method?

    Like this:

    String x = new...
  16. Re: Why do I get a "class expected error, when trying to pass a char ary through a pa

    What is the rest of your code? Also can you put your code inside code brackets?
  17. Replies
    1
    Views
    714

    String Tokenizer Help

    I need to read an address and phone number from a file. In the file there are three lines, each of them having something like John Doe, 123 first Street, (555) 555-5555, 123456789 on each line. I...
  18. Replies
    6
    Views
    694

    Re: grading program help

    You didn't pass the overallscore variable into the getScore method, so the compiler can't find it.
  19. Re: Help with toString method and an addObject method?

    Please put your code in [code] tags.
  20. Re: How to divide elements in two different arrays

    Yeah I know thats the formula on how to get the percent, but I dont know how to implement that. I have tried:

    percents[0] = (grade[0] / outOf[0]) * 100;

    ...
  21. How to divide elements in two different arrays

    I am using an array to store 5 test scores. Then I have another array for the total possible score the test could have. I just need to find out what percent the grade is out of the total possible...
  22. Thread: Input method

    by BuhRock
    Replies
    3
    Views
    853

    Re: Input method

    You can accept input like this:


    import java.util.Scanner;

    public class Testt
    {
    public static void main(String[] args)
    {
    String input;
  23. Re: Output Largest and Smallest Integers using only If statements

    Just to add to his reply, You were resetting the variables smallest and largest every time you asked, which just meant that they were going to take the value of the what ever was input last and...
  24. Thread: Getting input

    by BuhRock
    Replies
    1
    Views
    601

    Getting input

    Im writing the demo for my class to demonstrate each method. The class takes a number and assigns it to a month, or is supposed to. I have it working to say month 1 is January, month 2 is February...
  25. Thread: Grading

    by BuhRock
    Replies
    5
    Views
    1,436

    Re: Grading

    alright thanks, I use JGrasp, where there is no help but the errors the compiler gives, haha.
Results 1 to 25 of 30
Page 1 of 2 1 2