Well after looking at some of the topics in the "beginner section," maybe you ought to create a "pre-beginner section" just for me...
At any rate, I am having trouble conceptualizing the layout of a simple
Java program. In Javascript, it is quite possible to put a simple to middling-difficult project in one file. You can have their equivalent of multiple objects in one file. Also you can use these objects to sort of group together things. However, somehow I am overlooking some vital piece of information in my Java book. If I am reading things right, each class has it's own file, is that right? You would never put two classes in the same file??
Also, are these objects, apparently derived from classes/external files, are these objects the most suitable way to represent things in Java? I basically wanted to know how much change I currently possess in my "pocket." I wanted to keep a running tab and have the ability to add and subtract quarters, dimes and whatnot. So part of me wants to keep things simple and just have some sort of record-type thing that clumps together the various types of money. Each variable in the record-thingy is an integer. So one variable is entitled "quarters" and may possess the value 2, while another variable is called "dimes" and may be zero. Somehow I am missing the explanation of this in my book, but could somebody tell me the proper way? Does my program involve opening up another text file, name it class Pocket, and fill it with object code. Then I reference this from my main program?
Have I made this pocket thing way too complicated, and maybe I am better off just having ungrouped variables in my main class to represent nickels and dimes and whatnot?
Thanks,
Andrew