This is what I have so far to completed the following assigment: The program should include a menu of options using a switch statement, a for statement, three or more methods, an array, a loop, an if statement and instance variable and methods. Design the program to call methods kept in the PartyXXX file form the main method. One method could tell something about the party such as where it's located, what time it will be and what the party goers need to bring. Another could calculate the cost for supplies, food, drinks, etc. I got the following errors:
Here is my PartyXXX code:
The main program is here:
[ October 06, 2003: Message edited by: Marving Guildon ]
First I would get something basic to work, like printing out a menu or reading in data and taking some action. Then I would add functionality one piece at at time so if something went wrong I could easily resolve the problem. If I ran into something that did not make sense, I would have an easily isolated piece of code I could separate out and test in it's own class. I'd get that part to work and then integrate it back into the main program. Once I get the requirements fulfilled I would worry about what kind of loops I'm using and other window dressing. This called "Iterative Development" and it is a basic programming skill. As with all skills it requires practice to learn well. Throwing a bunch of code together and hoping someone else will debug it is not a basic programming skill.
Joe, Thanks for taking the time and review my program. I tried each code individually and they work, but when I put it together I got the error messages. So, I already used the programming technique that you referred. Any way, if you don't know how to fix it, probably somebody with experience in programming will help. [ October 06, 2003: Message edited by: Marving Guildon ]
Originally posted by Marving Guildon: Any way, if you don't know how to fix it, probably somebody with experience in programming will help. [ October 06, 2003: Message edited by: Marving Guildon ]
Maybe if you could have told me what your errors were or asked a specific question I would have helped you out. Insulting this Sun Certified Java Developer who is taking a break from maintiaining a 2000+ class enterprise application is no way to get help. Speak with your instructor. That's what they are there for.
Joined: Sep 17, 2003
Joe, That's an excellent idea, I will ask the instructor, thanks. You are really smart.
OK gentlemen, lets retire to our individual corners and come out smiling next time. Marving, the reason Joe came across that way was because all you did was post your code and ask for help debugging it. Can you give us some info as to where it is breaking down or what error messages you are getting? People often come in here and just throw some code up lookiing for someone else to do their homework or solve a problem before they put in any work themselves. Let us know what the problems are and there are any number of people that will be willing to help you out - even Joe
Joined: May 10, 2001
OK, so I'm slow. I see you put up your errors in your orginal post. just a quick note, if you edit your original post a lot of people will miss that because they are looking for new stuff to be added at the bottoms of the threads. Your first error is because you don't have a closing brace on the method above the wine method. At the end of your wine method you have a line that says: }/* end of output method */ I dont see an 'output' method and this brace will actually be closing the 'information' method that you didn't close before the wine method. If you add the closing brace to the information method then the lines below this brace will give you an error because they will be outside of the wine method. Hope thats a start for you
Originally posted by Dave Vick: Let us know what the problems are and there are any number of people that will be willing to help you out - even Joe
This guy appears to be a plagarist in the making. Handle with care.
Joined: Sep 17, 2003
Joe, I�m doing my work, I just don�t know and I have to ask, it is part of the learning process. I�m sorry if I insulted your in a previous posting. Let�s get something done and don�t sweat the small stuff.
Calm down guys!! This is a lot of code man, have you actually tried for a few moments to figure out what the errors are? you wrote that code (didn't you?), you should know what is going on... 1o) public void wine if this is a method, it should be: public void wine() 2o)
I don't know whether the indentation is playing tricks here, but again you have a method declaration with no "()". Inside (it looks like), you're having another method... hope this little help helps
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury