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.
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.
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.
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...
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?
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
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton