The line:
jfWindows.setDefaultCloseOperation(EXIT_ON_CLOSE);
Has to be implemented in an action listener right?
You can just put it in main once you've created the JFrame. It's just a call to a method, afterall ;)
The line:
jfWindows.setDefaultCloseOperation(EXIT_ON_CLOSE);
Has to be implemented in an action listener right?
You can just put it in main once you've created the JFrame. It's just a call to a method, afterall ;)
Doesn't 1.5 have autoboxing? (I still use 1.4 so I'm not sure)
I don't remember for sure (it's been several months since I've used Java), but I thought it didn't. Could very well be wrong on that, though.
Well, you've got a good start. Couple of tips:
a) use [code] and [/code] tags when you post code, so that formatting is preserved. Makes your code more readable for those trying to help ;)
b)your public boolean trial
should not be inside main. Make sure there is a closing brace }
for main before you define trial.
c) Since you know you need to have 100 numbers, you could store it simply in an array: int [] theNumbers = new int[100];
. I'd recomment that you familiarize yourself with the ArrayList class though (you'll have to use the Integer wrapper for this).
You should post a little more code if you have a problem. We won't do your homework for you, but we're willing to help you if you have problems. ;)
I don't see the reason for the 3rd loop
for(int k = 0; k < 14; k += 2)
cout << endl;
You'll be outputting 7 newlines between rows of stars... is that what you meant to do?
To be honest, I don't exactly remember how it works. I doubt it uses the 16-bit extender, though, since it's not an I type instruction. I want to say that there's a mux (and probably a 5-to-32 bit extender) between the register file and the ALU, but I really can't remember for sure. I do know that it uses the ALU for the operation though.
The reason cp -r source/*.h is not working is because you've only told it to look at .h files. For that reason, it doesn't copy the child directory (since it's not a .h file itself), much less its contents (though they may be .h files).
It just happens in the ALU. The op and funct bits for SLL are all 0, btw. Also, NOP is treated as SLL r0, r0, 0.
You answered 90% of questions correctly.
I missed 5 and 8... not too bad, though I should know 8 (I've missed similar questions way too often)
Sounds a lot like introsort, but that uses heapsort instead of mergesort...