713 Posted Topics
Re: You could at least try to get started before you ask for help. Work through it a little. What are the characteristics you're trying to model? Consider a supermarket - in that situation you have some number of lines (queues) and a source of customers. Each customer takes some random … | |
Re: It would be easier to help if you were to tell us exactly what you're trying to do. Even if you think your naming conventions are clear, you might be surprised. "Property", for example, is more likely to make a developer think of "attribute of an object" than "flat to … | |
Re: Love to help, but I'm not reading through all that. I see you started to get the array in order, then you switched to individual variables distinguished by numbers (property 2, property3, etc). That's a little weird. Have you got a question in there? | |
Re: This is a little peculiar - you're taking two parameters which are never read, but only written to. But no matter, you want to get the integer values or put an error message. Try Integer.parseInt, and wrap it in a try block. If there's a problem with the input, you'll … | |
Re: You want to split on any amount of whitespace? Try StoredStrings1 = Numbers1.split("\\s+"); \s matches [ \t\n\x0B\f\r], so it should suit your purposes. Or if you want to be more specific, you can match on just one or more spaces: StoredStrings1 = Numbers1.split(" +") You're going to want to read … | |
Re: Read this: [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Then figure out what your question is and ask it. | |
Re: Ah. Yeah, println expects a String, or something it can convert to a string. So you can println(a) and it'll convert it to a String and give you the ascii representation of a (in this case, 1 * 1, or 1) So println(int, int, int...) is not something the compiler … | |
Re: And, by the way, line separator in mac OS X is \n, not \r. It's like any unix. Not that you should be hardcoding it, mind you, you should use the system properties, that's why they're there. But it's worth knowing that, since there aren't a whole lot of pre-OSX … | |
Re: Prem - to keep it simple, here's a few simple things that you can accept as true. Later you can go into why they work this way, but for now: 1) You never need to declare a new String using the constructor form. Java will take care of it for … | |
Re: The one thing that's hard to dispute is that MacOS will be under more attack as its market share increases. However, given the choice, I'll stick with an open architecture where I know that a lot of smart people are looking for security holes and reporting and fixing them - … | |
Re: So the point of you taking a cs class and having us write the code for you is what exactly? :) Wrap the code that you want to loop in a while statement. This is an indefinite loop, you're going to go until the user's done playing. You can handle … | |
Re: Have you used any other object-oriented languages? In other words, are you looking for help on classes as a concept or on how to do OO in python? | |
Re: I'm new at this, but I have to wonder if it's more efficient to address your list of primes by subscripts or with something like for x in plist: but that's a question that would be answered by someone closer to the machine than I am (I've only been looking … |
The End.