What's new

Need to know the more complex ideas in Java.

Nouser

Nouser

Getting There
Messages
1,578
Reaction score
215
Alright, I know the basics of complex ideas in Java. Right now, I am on 2D arrays. I'm kinda stuck on Matrix Multiplication. Anyways, that doesn't matter. I'm programming in a contest tomorrow for $40, and I want to know the main things I should know and understand for it. Complex ideas, mind you. I am in Computer Science II currently, on my way to AP Computer Science. I know writing to a file, reading from a file, getting input, 1D arrays, all the loops, methods, classes, random numbers, string tokenizer, replacing letters in a string, etc. I just need to get the ideas that are more complex. Thanks for the help guys.
 
Forgoten Dynasty

Forgoten Dynasty

Free Sosa #bangbang
VIP
Retired
Messages
5,833
Reaction score
2,611
Java tend to run at a pretty high level, therefore there aren't pointers or anything of that nature. In my experience, contest like these tend to throw in things like recursion in to separate the amateurs (people who just go to the class) from people who actually have a passion for programming.

However, in your description of "things you know" you didn't cover anything to do with objects or classes - which are things that you should know.

Also know what the difference between public and private are and what the term static means.








One thing they really like to do on these test is they will give you a while loop like so:

int x = 0;

while (x <= 10) {
x++;
}

How many times does the while loop run
Answer: 11
Because it starts at 0 then executes all the way up to 10.
0
1
2
3
4
5
6
7
8
9
10


How many times does the while loop test for x
Answer: 12

After the while loop hits 10 It will then go back up to the top and test to see if it is less then or equal to 10. Therefore, it actually test the variable one more time then it runs.
 
D

dschu012

Enthusiast
Frame In Gold Seasoned Veteran
Messages
757
Reaction score
380
The Java Reflection API is something cool and worth looking at for some of the more advanced concepts in Java.
 
F

Fetus

Enthusiast
Messages
37
Reaction score
4
Check into interfaces and abstract classes, it isn't common unless working with a group but it could be something that is asked to see you're understanding of programming concepts.
 
larney

larney

Enthusiast
Messages
1,028
Reaction score
63
Idk more object oriented stuff I guess like methods, classes, subclasses, interfaces, ect., how that all works.

Maybe Applet stuff? have you done any graphics stuff? some of that maybe like textboxes buttons ect in applets.
 
Nouser

Nouser

Getting There
Messages
1,578
Reaction score
215
Yeah, I know classes and different variables. Slipped my mind, though :tongue:

The Java Reflection API is something cool and worth looking at for some of the more advanced concepts in Java.
Never used it.

Check into interfaces and abstract classes, it isn't common unless working with a group but it could be something that is asked to see you're understanding of programming concepts.
We haven't done those, really. This is on a CSII/AP CS level.

Idk more object oriented stuff I guess like methods, classes, subclasses, interfaces, ect., how that all works.

Maybe Applet stuff? have you done any graphics stuff? some of that maybe like textboxes buttons ect in applets.
We're JUST starting Java GFX, so I'll do that soon.


Thanks for the help, guys. We just kinda slacked off. Some of the problems were pretty damn bad, though. Like sorting things by date (BUT not getting the ID's mixmatched; it was in a 2d array. We had to sort the second value and keep it with the first. We found it impossible to do) and then by price with the same issue. And then a problem involving making an hourglass with the first row X number of *'s, X being the input. Then it decreases by 2 characters overall, places asterisks on the ends, and puts spaces in the middle until 1, where it does all asterisks down in the same manner.

Anyways, it was a good run I guess. I have a lot to learn. Specifically, matrix multiplication. If anyone could help me, you'd rock.

 
Calamity

Calamity

Retired
Retired
Messages
6,716
Reaction score
1,156
Me/fetus are in AP CS A right now and we cover interfaces/abstraction, although it was later on. If you plan to program for a living, it is definently helpful down the road, I try using abstraction daily, interfaces not so much.
 
F

Fetus

Enthusiast
Messages
37
Reaction score
4
Sounds like a tuff competition was it through your school or what?
 
Seahawk

Seahawk

Enthusiast
Messages
138
Reaction score
21
Well I'm in 8th grade now and next year I get to take AP Computer Science. Here is one thing that I can recommend. It was an idea I was working on a few days ago but never really got to finishing it. It was storing a 3D byte array. Besides that all I can really think of is maybe do something complex with math that isn't really supported within java. I did something with converting function forms. But just think a little bit.
 
Top Bottom