Search:

Type: Posts; User: alexd

Search: Search took 0.14 seconds.

  1. Replies
    11
    Views
    12

    Re: 234 tree search and insert

    but that s our homework.i made the changes in the second program but i want to make sure i got em right
  2. Replies
    11
    Views
    12

    Re: 234 tree search and insert

    but we haven t learn how to make programs in class!all we had to do is switch the classes etc to match the starting one(the first i provided).i did it but i don t know if i put them correctly in the...
  3. Replies
    11
    Views
    12

    Re: 234 tree search and insert

    yes i agree but this is not a complete program.its parts of a program that we don t have that s why i posted it here cause its harder to fix it and i needed all the help i could get!
  4. Replies
    11
    Views
    12

    Re: 234 tree search and insert

    the problem is that i don t know if i replaced the names in the second code correctly according to the ones he gave us in the first code
    let me explain
    he gave us all the names in the first code i...
  5. Replies
    11
    Views
    12

    Re: 234 tree search and insert

    i m not supposed to compile it and execute.i had a paper where i was asked to find on the web or think on my own a code for search and insert a key in the 234 tree(i study math so he doesn t really...
  6. Replies
    11
    Views
    12

    234 tree search and insert

    hello everyone i got this assignment.We have this piece of code and we must make a search for a key.if the key exist it returns true if not false.Plus we must insert a key in the class.if it is...
  7. Thread: infix to prefix

    by alexd
    Replies
    1
    Views
    138

    infix to prefix

    hey guys i m having a problem with infix and prefix
    here is the code

    import java.util.StringTokenizer;
    import static java.lang.Math.pow;
    import java.util.Stack;

    public class Calculator {
    ...
  8. Replies
    25
    Views
    236

    Re: problem with calculator

    i tried to compiled it again and now it says provided class name is invalid.how did this happen?are online compilers trustworthy?
  9. Replies
    25
    Views
    236

    Re: problem with calculator

    scanner class is more preferable.no need for joptionpane
    as for the string it will be something like something like
    system.out.println("give numbers");
    String input = scan.nextLine();...
  10. Replies
    25
    Views
    236

    Re: problem with calculator

    yes now i have another question if you don t mind!i have a code for an infix post fix and evaluation as a calculator
    here is the code.it compiles its ok

    // Stack for numbers: 'values'
    ...
  11. Replies
    25
    Views
    236

    Re: problem with calculator

    ah yeah i understand what u meant!thanx!sorry but i m really dizzy and english is not my main language!
  12. Replies
    25
    Views
    236

    Re: problem with calculator

    i added these at the start
    import java.util.StringTokenizer;
    import java.util.Stack;
    forgot to paste them.now it compiles
  13. Replies
    25
    Views
    236

    Re: problem with calculator

    i copied paste it wrong from my wordpad!sorry but i m very tired i ve trying this thing for hours.now i think i pasted right!
  14. Replies
    25
    Views
    236

    Re: problem with calculator

    ok guys so i changed the code and i compiled and didn t find any mistakes.but when i run it it shows me this ( i try to run it in an online compiler site )
    Compiling the source code....
    $javac...
  15. Replies
    25
    Views
    236

    Re: problem with calculator

    yeah my bad i did it right this time and it shows me
    constructor Arithmetic in class stackscalc.Arithmetic cannot be applied to given types;
    required: java.lang.String
    found: no arguments
    ...
  16. Replies
    25
    Views
    236

    Re: problem with calculator

    i added this part
    public static void main (String[] args)
    {
    Arithemtic calculator = new Arithmetic();
    calculator.isBalance();
    }
    but it says class, interface, or enum expected...
  17. Replies
    25
    Views
    236

    Re: problem with calculator

    yes guys i m sorry you are right.i have a class and our instructor after like 30-40 hours of java wanted us to make a calculator using 2 stacks and i struggle to make it.i m newbie to java.he doesn t...
  18. Replies
    25
    Views
    236

    Re: problem with calculator

    oh sorry its just that i have to give this assignment in 10 days and i m kinda nervous!i fixed though thank you!
    any suggestions guys?it gives me error and i don t know what i did wrong
  19. Replies
    25
    Views
    236

    problem with calculator

    hey guys i got a problem with this program.I m supposed to make a calculator using stacks but it seems that i m stack. i can t get the right recognition for () and {} []
    any tips?
    its not necessary...
Results 1 to 19 of 19