Recent Feedback
I am trying to do the following homework but I just cant get it to compile and run"The Acme computer company sells computers. The price of a computer depends on user-customizable features. The relevant choices are:§ Processor speed: 4 or 6 GHz§ Memory: Any amount of memory expressible in 1 GB chunks between 1 and 8 GB§ Hard Drive: 200 GB, 400 GB, or 600 GB§ Monitor: 15", 17", or 19" (flat panel)§ Laptop or desktopThe cost of a computer is determined as follows:Cost = $50.00 per GHz of processor speed + $50.0 per GB of memory + $0.40 per GB of hard drive space + $1.00 for each square inch of monitor size (assume that a monitor of size n has a height of 0.6n and a width of 0.8n.)Add $500 for a laptop. Laptops cannot have 19" screens.So, for instance, a desktop system with a 4 GHz processor, 1 GB of memory, a 200 GB hard disk, and a 17" monitor would cost (4 * 50 + 1 * 50. + 200 * 0.40 + .6 * 17 * .8 * 17 * 1.00) = $468.72.If you buy the 6 GHz processor, you must buy at least 2 GB of memory.Program SpecificationWrite a program that computes the cost of a user-configurable computer sold by the Acme computer company. The pricing policy is given above. You should ask the user what processor speed, memory size, hard disk size, and monitor size they want, and whether they want a desktop or laptop machine. You should check to be sure that they give a valid value, and end the program with an appropriate message if they do not. If all values are valid, then you should output the price of their computer.Your program should use JOptionPanes for input and output.Use at least one switch statement.It is important that you do defensive checks on the inputs. So report back to the user (and terminate the program) if the user asks for an invalid memory size, or wants too little memory with the 4 GHz processor.For situations where there are only two choices, it is best to use an "idiot-proof" input method. Use a JOptionPane.showOptionDialog box to ask whether the user wants the standard or upgraded hard drive, processor, and monitor."
Optional Information: Computer OS: Windows 7 Browser: IE Programming Language: java Compiler: cmd Already Tried: import javax.swing.*; public class ComputersPrices { public static void main(String[] args) { Object[] options = {"LabTop", "DeskTop"}; int computer = JOptionPane.showOptionDialog(null, "Select your computer type", "SELECT PC", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, null); boolean Laptop; boolean Desktop; String monitor = JOptionPane.showInputDialog(null, "Enter the Monitor size you desire", "15, 17 or 19"); String hardDrive = JO
what compiler are you using? Netbeans?
Textpad and and eclipse
what commands do you run to get your code to compile? I'll admit I do not understand the use of textpad and eclipse when everything can be done graphically within eclipse
is there a reason not to use the gui designer?
I use them separately. cuz I am not too comfortable with using eclipse yet.