Practice Questions / Problems / Projects
Just wondering if anyone on the forums had some interesting programming problems/projects etc. that they did in a first year university or senior high school programming class.
I've looked at all those problems on the internet(went through quite a few pages on google) and:
1) They are beyond my programming level
2) They're extremely boring
3) I've already done it
I'm trying to get a really good grasp on java before I head to uni next year, I'm already ahead since I've taken a high school course in it, but I would like to get even further ahead :)
Any suggestions would be greatly appreciated!!!
Re: Practice Questions / Problems / Projects
I rememeber someone suggesting Project Euler on this forum before so I checked it out, it's kind of cool if your decent at math.
It basically contains math problems that are too tedious to do by hand so you need to write programmes to do them. I think Java isn't the best for this as you'll have to use the BigInteger/BigDoubles sometimes which are a bit annoying to work with whereas Python I believe works fairly well with these.
Also these problems aren't built to be OO but you can resuse some classes for mulitple problems if your clever enough ;).
Project Euler
Can't really think of anything else. Maybe try to build a game, minesweeper or something.
Re: Practice Questions / Problems / Projects
You can try Top Coder. It's algorithm intensive, though. The premise of the site is to come up with the most efficient algorithm possible given a story problem. Solving the problems are usually quite easy, but coming up with the most points is extremely difficult.
You can also try re-creating your favorite board/card games in java. (note: AI can be sort of a pain for some games)
Learning about algorithms/data structures is a very useful thing (albeit, quite tedious sometimes).
Here are some very useful algorithms/data structures you could try implementing (just search for them on wikipedia) in no particular order:
1. Merge Sort
2. Quick Sort
2a. Quick select
3. Insertion Sort
3a. Shell sort
4. Heaps and Heap sort
5. Hash tables
6. Trees
6a. Binary search trees
6b. Tree traversal: Prefix (left-right-node)
6c. Tree traversal: infix (left-node-right)
6d. Tree traversal: in-order (node-left-right)
7. Dijkstra's pathfinding algorithm
7a. A* pathfinding (this website is better for learning A*: A* tutorial. Note: it does use C for their code, but the ideas are much easier to understand here)
8. Queues
8a. Priority queues
9. Stacks
11. Graphs
I think that's most of the basic algorithms and data structures that you will find useful (there might be others)
Re: Practice Questions / Problems / Projects
i have a problem if anyone would like to take a shot at.
i have a set of answers to a test. i need to have a program calculate students answers against the answers. each correct answer is 2 points, each wrong anser is - 1 point, and no answer gets 0 points. the output needs to return the student ID, then the answers, next should be the test score, and last should be the test grade. grading scale of A thru F.i use netbeans to do this program. the ansers are true and false. T F F T F F T T T T F F T F T F T F T T. the first students ID and answers are ABC54301 T F T F T F T T T F T F T F F T T F T. the blank means he did not answer that question. please let me know what you think.