Search:

Type: Posts; User: mael331

Search: Search took 0.16 seconds.

  1. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    Alright I made some change to the testprintqueue :

    import java.io.*;
    import java.util.*;
    import java.lang.*;

    public class testPrintQueue
    {
    public static QueueClass mainQueue
    ...
  2. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    the error is from this line

    that's why i have a system.out.println(); to see it the parsing is actually working , now i am trying to pass each variables into the setPrintjobInfo method
    type is...
  3. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    I have attached the folder where i have everything stored and thanks again for helping me
  4. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    Sorry lol
    import java.io.*;
    import java.util.*;
    import java.lang.*;
  5. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    Here is the test file

    public class testPrintQueue
    {
    public static QueueClass mainQueue
    = new QueueClass();
    public static QueueClass addQueuePriority
    =...
  6. Replies
    14
    Views
    575

    Re: Trouble loading elements into a queue

    What variables is the input in? A is suppose to be a string , both B and c are integers
    What does "load" mean? I mean I want to pass each variables

    What are the definitions of the variables:
    ...
  7. Replies
    14
    Views
    575

    Trouble loading elements into a queue

    Hey guys ,
    I am working on a print queue read from a file but I can only read the input file and parse it, I don't know how to load the elements from the input to the queue.
    The file input...
  8. Replies
    5
    Views
    395

    Re: File Input Trouble

    I don't really want to use the scanner class because I have no idea how I can implement it to display the items and prices also I want the prices to be double how can I convert the prices from String...
  9. Replies
    5
    Views
    395

    Re: File Input Trouble

    Thanks for your reply , i am trying to read the items and prices from the input file into the program so I can calculate the subtotal then the total price .
  10. Replies
    5
    Views
    395

    Need help with File input .

    Hello ,
    I have this fun assignment not for a grade i have to do , I am suppose to read the offering and prices of a restaurant menu from a file like this one


    Blueberry Muffins $0.85...
  11. Replies
    16
    Views
    539

    Re: Division by Zero

    The MyDivisionByZeroException I created

    public class MyDivisionByZeroException extends Exception {

    public MyDivisionByZeroException(String strMessage)
    {
    super (strMessage);...
  12. Replies
    16
    Views
    539

    Re: Division by Zero

    I got it figured out :
    I created a class called MydivisionException; and

    if (divisor == 0) throw new MyDivisionException("Why did u just divide by 0 Try Again ");
    Thanks for your help
  13. Replies
    16
    Views
    539

    Re: Division by Zero

    What my response to the division or to your post ?
  14. Replies
    16
    Views
    539

    Re: Division by Zero

    Just tried this still not working :

    if (divisor == 0) throw new java.lang.ArithmeticException("Why did u just divide by 0 Try Again ");
  15. Replies
    16
    Views
    539

    Re: Division by Zero

    Thanks for your response
    I do not get a error message as a response I get "infinity" but I want to be able to write my own response instead of the default one
  16. Replies
    16
    Views
    539

    Division by Zero

    Hello everybody ,

    I was messing around with java and when I tried to divide a double(decimal) number by 0 ; it was giving me a Infinity response ; does anyone know how to override that infinity...
  17. Replies
    3
    Views
    356

    Re: Need some Input on an application

    yes to all three of your questions but since i am beginner i taught it will beneficial for me to have some people look at what i did
  18. Replies
    3
    Views
    356

    Need some Input on an application

    Hello everybody , I did an assignment for my java class and would like to have some input ; I have to create a program using a two dimensional array and average the high and the low numbers separatly...
  19. Replies
    1
    Views
    308

    How to use format outpout

    Hello,
    I would like to know how to format an output to 2 number after the comma , with this code

    MinutesTF.setText("" + Minutes);
    I taught It was going to be something like ...
  20. Replies
    3
    Views
    309

    Re: Please Help I'm stuck

    ILan can you please tell me how I can do that
  21. Replies
    3
    Views
    309

    Please Help I'm stuck

    Hello ,
    I am having trouble with my code I am a beginner and I know I probably made a mistake somewhere but can't figure out where .
    -I want to only have 7 letters to output but I can't figure out...
  22. Replies
    2
    Views
    347

    Re: Issue with output format

    Thanks so much Sean4u your links helped me a whole lot this what I came up with :


    System.out.printf ("("+x +","+ y+") is on the third line");
  23. Replies
    2
    Views
    347

    Issue with output format

    Hello,

    I am a beginner in java and I want to output a line as follow :

    "your number is (x,y) and is on the third line "

    x and y are the user input and if I put a number for example 1 as x...
  24. Replies
    0
    Views
    420

    Formatting Output

    Can a mod please delete this thread I got my answer .

    Thanks
Results 1 to 24 of 24