Results 1 to 14 of 14
Thread: I really need help!
- 10-12-2009, 04:41 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
I really need help!
Hi,
I am in a computer science 1 class which is a beginners java course. I am a Math major, but I need to have this class in order to proceed with my major. I am having a hard time with this class and I was just wondering if someone could help me pass this class?
Thank you for your time.
PS
I have attached my assignment.
-
Hello, and welcome to the forum.
So in essence what you've done is to give us your entire assignment without asking a question, and I'm afraid that in this situation there's not much that we can do for you other than to direct you to a tutorial or two.
I suggest that you post your best solution that you've created so far, and ask as specific questions as possible, and we'll be much better able to help. If you really have no idea how to begin here, then please have a look here: Starting Writing a Program. It's a well-written article that can help.
Much luck and again, welcome.
- 10-12-2009, 05:20 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can you tell me what you have tried so far? Show effort here.
- 10-12-2009, 05:21 AM #4
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
I am having a hard time putting a method inside a method. here is what I have so far.
-
I'm sorry to say this, but you should consider scrapping that code and start over as it's full of errors and may not be easily correctable. One thing I recommend to all newbie programmers is that you compile early and often. In fact if you are not using an IDE, you should compile your code after adding each new line or after changing any line. Then if the code doesn't compile, don't add any new code until you've fixed the compile error. If you don't do this, you'll end up with nothing but a rat's nest of errors.
Start out with a code skeleton like so:
Compile the skeleton and fix any errors. Then if your class will have a main method, add just that:Java Code:public class LogIn { }
and again compile and fix. Then add variable declarations and compile and fix, etc... so by successive steps, you have code that you know will at least compile.Java Code:public class LogIn { public static void main(String[] args) { } }
My next suggestion is that when you post code here, you post the code into the forum and not upload a file as you've done. The easier you make it for other's to read your code, the more folks will be willing to read it. Don't forget to use code tags when posting code here (see my signature for a link on this).
Finally, you might wish to contact your teacher to arrange some one-on-one time to get you caught up as it looks like (at least from your code) that you're quite a bit behind in this class.
Much luck
-
When is this assignment due, by the way?
- 10-12-2009, 05:49 AM #7
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
Tomorrow at midnight. Its a required course for my major and I just have to take one.
-
You're kind of starting late, and if possible, you should request an extension.
I'm not trying to be rude, but this statement may not help your cause here, since most of us are motivated to help out of love of Java. The ones we like helping the most are the ones who show desire and effort to learn the language, rather than the ones who are trying to just get by. Again, you'll likely get help here, but realize that usually the more effort you show, the more help you'll likely get. Again, much luck.Its a required course for my major and I just have to take one.
- 10-12-2009, 06:13 AM #9
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
I have been working on this for a week now and I have put hours into. I have also re-written it many times. And asking my teacher for help is no help at all. Its a complete waste of my time. I am sorry that this is not something that I want to do for the rest of my life. But I do want learn and I would really like to get an A class so that is way I am here. I want to learn, and I want to do a great job in the class. And I am sorry if I gave off the wrong vibe. But I really do need a little more help understanding this stuff. It just doesn't click in my mind.
-
Looking through your assignment, it appears that the class skeleton has already been made for you. Just get rid of the ellipses "..." in the empty methods like so:
Now what you have to do is work on each method, one at a time. Get one method to work (testing it in the main method with simple tests) before working on the next. Through small steps you'll succeed.Java Code:public class LogIn { public static boolean isValidPwd(String pwd) { boolean valid = false; // TODO: fill in return valid; } public static boolean isValidUsrName(String pwd) { boolean valid = false; // TODO: fill in return valid; } public static boolean login(String usrName, String pswd) { boolean successful = false; // TODO: finish return successful; } public static void saveUser() { } public static void main(String[] args) { } }
Again, read or re-read this article which can help crystallize the steps you'll need to solve this puzzle: Starting Writing a ProgramLast edited by Fubarable; 10-12-2009 at 06:18 AM.
- 10-12-2009, 06:20 AM #11
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
And I really do appreciate your help.
- 10-12-2009, 06:22 AM #12
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
and also before the public static boolean isValidPwd(String pwd) she told us to put
public static (Space, she didnt say what to put here) register (and again didn't say what to put here) and then string = userName
(isValidUserName(userName) == true.
- 10-12-2009, 07:54 AM #13
"I'm not trying to be rude, but this statement may not help your cause here, since most of us are motivated to help out of love of Java. The ones we like helping the most are the ones who show desire and effort to learn the language, rather than the ones who are trying to just get by. Again, you'll likely get help here, but realize that usually the more effort you show, the more help you'll likely get. Again, much luck." -Fubarable
I have never read a more apt statement on these forums. =)My Hobby Project: LegacyClone
- 10-12-2009, 09:41 AM #14
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You mean another method?
This is a method.
And then you define another method with some parameters and return type and call another method.ublic static boolean isValidPwd(String pwd)
public static (Space, she didnt say what to put here) register (and again didn't say what to put here) and then string = userName
(isValidUserName(userName) == true.


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks