Junilu Lacar wrote:
jeff cantrell wrote:right I have seen that work in netbean with the classes. I will try it. But am I right with having to have them all work together with week two.
I don't believe you correctly understood what is being asked of you.
The requirements say:
A salesperson will continue to earn a fixed salary of $50,000
That change you made, fixedSalary = 100000, is direct contradiction to that requirement.
The requirements say:
Sample Table: Assuming a total annual sales of $100,000, the table would look like this:
Look carefully at your code for SalesPerson for something that represents the annual sales.
Junilu Lacar wrote:
jeff cantrell wrote:I did this for week two and this is what I came up with and it is correct for the assignment I am struggling with the table portion for week three which is what the assignment I ask questions about is added on to this.
jeff cantrell wrote:this was week 2's assignment question
...
The Java application should meet these technical requirements:
The application should have at least one class, in addition to the application's controlling class (a controlling class is where the main function resides).
There should be proper documentation in the source code.
One fundamental problem is that you think your Week 2 submission was correct but it actually isn't. I have often railed against the way students are taught these days and this is just another prime example of the kind of problems I see in the quality of instruction. It's all giving without proper guiding. You're (hopefully) given a lot of material to digest but you're not guided on the right ways to do things.
Here are the problems with your week II solution:
1. All your code is in the static main() method. This makes what you wrote more of a script, not a proper Java program.
2. You were required to "have at least one class in addition to the application's controlling class" which you do not have. Again, this is because all your code is jammed into one place: the main() method of what basically should be your "controlling class".
3. Because you failed to provide an additional class, I doubt you understand what the requirement aims to teach. I tried to explain what you needed to do in the previous replies that I posted. I realize that you probably looked at those long posts and your eyes glazed over but those are some of the things that can help you understand the goal of the requirement. I tried to give simple examples to hold your interest but the concepts are not trivial and you really need to study those examples and see how everything fits together. IMO, understanding what I tried to explain there would actually help you move forward.
4. I think #3 because you think you can just add on to what you did in week II to get a solution for week III. If you tried hard and long enough, you might succeed in producing the desired output but if you stay on the trajectory that you're on right now, the resulting code will still not meet the technical requirement and it will be a big mass of code that's hard to understand, otherwise known as a Big Ball of Mud.
I asked whether you were willing to throw away most of the code that you wrote before and basically start over with the pattern I gave you. It seems like you're not inclined to do that though, which is fine but a little disappointing. Good luck.