Programming is about thinking, NOT coding
Jhoel Esmejarda wrote:@Vishal Shaw
Package? uhmm.. I think I should finish first the Head First Java book, I'm stuck in Chapter 5 Extra-Strength Methods, I don't know yet the package but I will try to learn it bit by bit. Thanks with the comments.
Programming is about thinking, NOT coding
The biggest gamble will be to ask a question whose answer you know in that it will challenge your theory | www.TechAspire.blogspot.in
Rajdeep Biswas wrote:Hi Jhoel,
Its encouraging that you are putting your efforts. I have not gone through your code completely but do have a small recommendation. Creating a lot of objects is not recommended, you know it. So, why create String objects again with same value.
For example, you wrote the following lines in more than one place:
So, you can introduce a constant file, like following:
This is just for example. And you could use these as follows:
Remember, this just exemplifies, not justifies the requirement. So you have to decide and this way you're spared creating duplicate and used-in-many-places String objects. The same holds for other data types like "int" also.
Best wishes
Programming is about thinking, NOT coding
Vishal Shaw wrote:there's a lot more to learn , which he will eventually pick up on the way.
For now, he's doing a good job.
The biggest gamble will be to ask a question whose answer you know in that it will challenge your theory | www.TechAspire.blogspot.in
Jhoel Esmejarda wrote:The first one is the Menu Class...
second one is the Slot Class that gets your order and payment...
Please help me with this, I don't have any formal training with programming nor a graduate of any computer course, I'm just studying by myself...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Jhoel Esmejarda wrote:Thanks for the post, actually I've been waiting for your comments . For now I will try my best to improve on things that you pointed out. Is there any book that you can recommend that can give me (as a beginner) a good start on things about Programming in Java?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:WHAT IT IS ... WHAT IT DOES ... (and lots of other good stuff)
Programming is about telling a story. Code is the programmer's interpretation of what the system should do, written as formal instructions that a computer can interpret and execute. Design is how the story is told and how the plot unfolds. As with any good story, well-crafted code should be engaging and help the reader understand exactly what the author was trying to say.
H. Abelson and G. Sussman (in "Structure and Interpretation of Computer Programs") wrote:Programs are meant to be read by humans and only incidentally for computers to execute.
Junilu Lacar wrote:Some of what Winston wrote under "IS" is actually "DOES" though.
Edit: BTW, Dijkstra's first name was Edsger
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|