In my experience, AP classes usually have students in them who already know something about their subject. I would imagine this is particularly true of computer classes involving programming. I suggest you find another student willing to give you pointers about how to get started.
If you try something and don't understand what an error or problem is, this forum is a good place to get answers to questions like that.
Check out the java.util.Scanner class at http://download.oracle.com/javase/1,5,0/docs/api/java/util/Scanner.html
This should help you understand how to read the numbers from a file.
All the best with you assignment.
You should write down on a sheet of paper what you want to do. Tell yourself exactly how to do it. It should be really simple. Instructions like thisare a start, but should be made even simpler. Once you have got the instructions really simple, you will know what code to write.
This is called the pseudo-code approach.
Jay Jeong wrote:Hi, Im in AP Computer Science, and I am in serious trouble. I cant drop out because it's an AP class, and not only that, my teacher cant teach, nor can I afford a tutor.
It's unfortunate that you are in such dire straits, but this site is not intended to help with time management problems or financial problems. Bringing those up only distracts from the problem that we can help with--the technical Java problem.
Where do I begin? how would I start this?
Jay Jeong wrote:I'm not asking for financial assistance
I realize that. I simply pointed out that mentioning your finances is not at all relevant to the problem at hand, and is a distraction from discussion of your Java problem.
Im simply asking how I should do certain programs. Im asking if there are any websites that can actually EXPLAIN how I can do my assignments.
That's what your class is for. And the page I linked provides some good advice too. Did you read it? Did you try following that advice? How far did you get? Where did you get stuck?
I thought this was a site that teaches me how to, but I guess I was wrong
If you thought this site was meant to teach you the same way your class is meant to, then, yes, you were mistaken. If, on the other hand, you're willing to ShowSomeEffort, take your best stab, and ask a more specific question than "How do I write program X?" remembering, of course, to TellTheDetails, then you will find people are happy to nudge you in the right direction to help you get over the hump.
Jay Jeong wrote:the scanner checks to see if certain numbers are in a given DAT.file (file with a list of 100 random numbers). Where do I begin? how would I start this? please, someone help
You need to start by breaking the problem down into the different components. you do this by writing down the steps and refining them over and over and over - you don't even touch a computer until you've spent a few hours with paper and pencil.
A few questions come to mind:
Where do these "certain numbers" come from?
Will you get them all at once, or one at a time?
Do you want to check them all at once, or one at a time?
What is the format of the data file?
What should your interface look like - can it be a command line, or do you need a GUI?
At the very least, you need three parts:
Note that I wrote item 3 in a very generic way. It doesn't matter WHERE those two lists come from. I should write my code in such a way that if I have two lists (one of those lists may only contain a single number), I can see if the elements in list 'A' are in list 'B'. This allows me to change my program later in case my prof says 'instead of reading the numbers from a file, you need to read them from a database'. If he does that, I only need to change the part of my program that reads the data, as the comparison part is not tightly coupled to how i read the data.
So those are some tips on developing your program. But the actual answer to the question of "Where do I begin" is "download and install the JDK, and get it working". Then write a simple "Hello, world" program, compile it, and run it.