Campbell Ritchie wrote:Do checkboxes have numbers in? I thought they only had ✓ in.
Do you have a Computer class? Can you set its components so the getDvdDrive method returns the price of a DVD drive (or 0 as appropriate)?
Why do you have a method where you are setting the values of the parameters (lines 9‑20)? Or is the the method you have been told to delete? Why are you mixing double arithmetic and integer arithmetic?
Don't use double arithmetic for anything involving money. Use BigInteger, or alternatively, denominate everything in whole numbers and use integer arithmetic.
What you are doing in the next method is going through the options and terminating the adding process as soon as you find one which has been selected. You want to go through the whole lot and not return anything until you have done all the additions. That will of course give you a total, not numbers in checkboxes.
The checkboxes do not have numbers in them, it is in fact a check mark. I want to make it so that when a check box is chosen, and the type of shipping is chosen, the applet calculates the total for the items chosen and calculates the shipping based on those items all together.