you haven't implemented the reduce method yet, once you have implemented the reduce method then you can use it in your add function like this:
r1=reduce(r1);
r2=reduce(r2);
return Rational(r1+r2);
Type: Posts; User: retsameht
you haven't implemented the reduce method yet, once you have implemented the reduce method then you can use it in your add function like this:
r1=reduce(r1);
r2=reduce(r2);
return Rational(r1+r2);
a better way to keep the flights sorted is to added in a sorted way in the first place instead of adding it and then sorted.
rearrange the joinqueue function like this
x=new Fligh();...
What's the question?
when you are appending the builder variable, i notice you only apend the "\n" newline and nothing else. You need to append the record to the builder variable:
i.ei....
you can create instances of you class in your main. then you can use those instances to perform whatever you need to.
i.e.
...main()
{
ShuntingYard var1;
.....
}
you need a main class to execute and get user input
add the following under your Assign8_Roberts constructor
void main(String[] args)
{
Scanner scan = new Scanner(System.in);...
I'm trying to build a bank simulation using a queue, I got it to run but the results are not expected.
i'm trying to have clients adding to a queue and Tellers serving them running for 2 minutes....