Results 1 to 2 of 2
Thread: newbie Needs urgent help
- 03-16-2010, 08:12 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
newbie Needs urgent help
Ok so im a complete newbie and i need help with a project im working on for class. Its 3am here and i hav to hand it in by 8am. Im freakin tired and nothings working for me. I would HUGELY appreciate it if anyone could have a look at my code and step me in the right direction
Heres the instructions-
Write a program that calculates the amount of paint needed to paint a room.
The program should start by asking the user for the length, width, and height of the room, and the number of doors. It should then compute the area of wall that needs to be painted, subtract the area of the doors, and then compute the amount of paint. Finally, it should print out the total amount of paint needed.
* all the doors have a standard size of 80cm by 2.1m,
* one litre of paint covers 15 square metres.
And heres my code so far
import java.util.*;
import comp100.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.BorderLayout;
import java.awt.Color;
public class PaintCalculator{
public void userinput (String args [])
{
double l = Double.parseDouble("Not sure what to put here??");
double w = Double.parseDouble("Not sure what to put here??");
double h = Double.parseDouble("Not sure what to put here??");
double d = Double.parseDouble("80 * 2.1");
double wallarea = Double.parseDouble("l" + "w" + "h"); Is this right?
JOptionPane.showInputDialog("Insert a " + l + " ");
JOptionPane.showInputDialog("Insert a " + w + " ");
JOptionPane.showInputDialog("Insert a " + h + " ");
JOptionPane.showInputDialog("Insert number of " + d + " ");
System.out.println();
}
public void calculatePaint(){
// code is going to go here
}
- 03-16-2010, 08:57 AM #2
There's no way you get that done in 5 hours. Go to bed and start your next exercise a bit earlier.
A few pointers won't help you at all, and nobody will finish your assignment for you.Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Similar Threads
-
[newbie]
By jon80 in forum New To JavaReplies: 10Last Post: 07-07-2009, 12:10 PM -
Another newbie
By PhHein in forum IntroductionsReplies: 0Last Post: 04-22-2009, 01:26 PM -
:) newbie...........
By Somitesh Chakraborty in forum IntroductionsReplies: 1Last Post: 08-19-2008, 09:00 AM -
newbie newbie newbie
By krislogy in forum New To JavaReplies: 9Last Post: 08-15-2008, 12:28 AM -
Newbie
By CSnoob87 in forum IntroductionsReplies: 2Last Post: 02-18-2008, 08:49 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks