Here is my compiler error that NetBeans gives me:

Knute Snortum wrote:The variable

computeris a type double and the variableextraKeyboardis a check JCheckbox. There's no way to "add" the two.

The methodprices()is confusing you, I think. It can be removed; it's doing nothing.

How would I make it so that I can give each of the check boxes and the computer a value so I can add them together. I have to use the applet to calculate shipping so each of the checkboxes having a number value is crucial.

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.

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 mixingdoublearithmetic and integer arithmetic?

Don't usedoublearithmetic 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.

Lexi Turgeon wrote:How would I make it so that I can give each of the check boxes and the computer a value so I can add them together. I have to use the applet to calculate shipping so each of the checkboxes having a number value is crucial.

How about something like:

All things are lawful, but not all things are profitable.