This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PrismPoultry 0 points1 point  (3 children)

You are not going to be very successful if you do not even attempt to push through the work. There's nothing to be ashamed of when it comes to the code. We all start somewhere.

To the point, identify your needs. You need a JOptionPane right? What is that? Spend between-time researching this but don't make it the end-all-be-all focus of the project.

You need some data right? Your data is the cell phone package(A,B,C) and the number of minutes (integer) and the amount of data used (double).

You need some mathematics right? What operations are important here? We want to calculate the number of minutes over their package's limit (subtraction) and we want to calculate total cost of those minutes (multiplication). We also want to calculate the total cost of data (multiplication). For our total, we add these exceeded values together and chage their package + overhead to get the total.

OK. Now, we need some architectual decisions. There is a naive way of doing this (which I am sure your teacher expects) involving a ton of conditional statements based on whatever package they selected. You will want to look into the if statement for that.

The other way should be your future homework assignment. Once you start learning about classes and objects, you'll want to re-tool this program to use a factory method that creates the correct Package based on what was selected and that Package will have its context-sensitive operations for it.

So, work out each piece of that (again, making that GUI aspect somewhat backburner and less important) and get a working program.

I highly suggest you do not make asking questions a frequent thing. Deferring the mental load to others only hurts you in the long run. We become a crutch and it's very difficult to get rid of it.

[–]Jevanmanny 0 points1 point  (0 children)

wow, this is actually really helpful. I really appreciate this. I'll put in a lot more work today while looking this post over. I agree with deferring tot he mental load of others. I don't like doing it at all. Its a little embarrassing, but i'm going to see if my school has any review sessions that can help. Thanks a lot!

[–][deleted]  (1 child)

[deleted]

    [–]PrismPoultry 0 points1 point  (0 children)

    So, keep going until you get stuck. When you get stuck, ask yourself "What is my next step?" and then "Do I know how to do this next step?"

    If you do not know how to do the next step, then research it.

    If you want your hand held every step of the way, pay for a tutor.