Results 1 to 20 of 23
- 04-05-2009, 09:16 AM #1moostico246 Guest
hello i need help, i juss want da codes, so i could practice...ya digggg
Create the Java code to implement the pseudocode. You will need to devise names and types for most of the variables you need (I start you with one).
Full credit for a program that compiles and runs correctly.
/* This program calculates the number of gallons of paint
needed to paint a room.
Programmer: jack
Date: March 31, 2009
*/
import java.util.Scanner;
public class PaintersHelper {
static float DOOR_SIZE = 15.0f;
static float SMALL_WINDOW_SIZE =2.0f;
static float LARGE_WINDOW_SIZE = 5.0f;
static float SQ_FT_PER_GALLON = 375.0f;
public static void main(String[] args) {
// declare all variables to be used (I provide one to get you started.)
int gallons;
// give welcome and instructions to user
// prompt user for the room's width
// prompt user for the room's length
// prompt user for the room's height
// prompt user for the number of doors
// prompt user for the number of small windows
// prompt user for the number of large windows
// gross square feet = height * 2 * (length + width)
// subtractions is the sum of:
// number of doors * door size
// number of lgWindows * lgWindow size
// number of smWindows * smWindow size
// net square feet = gross square feet - subtractions
// gallons = netSqFt / SQ_FT_PER_GALLON rounded to the nearest gallon
// display the answer.
System.out.println("\nYou will need about " + gallons + " gallons of paint.");
} // end of method main
} // end of class PaintersHelper
- 04-05-2009, 09:21 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,546
- Rep Power
- 11
- 04-05-2009, 09:25 AM #3moostico246 Guest
ummm wat,,,,can u do this, yes or no???????????
- 04-05-2009, 10:07 AM #4
Whether he can or can't isn't the issue. The question is, can you?
db
- 04-05-2009, 10:15 AM #5moostico246 Guest
1st of all fuck u, i really didnt want ur lil remarks here, 2ndlyyyy can u fuken do it, if you cant contribute and help, den go somewhere else fuckboy..
- 04-05-2009, 03:16 PM #6
Abuse reported. The way the forum works is that it helps people with specific Java questions or problems... it's not a "Code-R-Us" forum. The idea is that the OP learns and implements his/her own code... not get the freebie and not learn.
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 04-05-2009, 03:41 PM #7
Member
- Join Date
- Mar 2009
- Posts
- 40
- Rep Power
- 0
I did it because it is good practice for me. There might be stuff done wrong and not as it should be done but at least it is working.
In the future try to do it on your own and ask when you encounter problems.
Someone else doing it for you is not the best way because you won't learn anything.
By the way: It only took me 5 minutes with the posting included which tells us that you haven't even tried.
Java Code:/* This program calculates the number of gallons of paint needed to paint a room. Programmer: Natrix Date: April 5, 2009 */ import java.util.Scanner; public class PaintersHelper { static float DOOR_SIZE = 15.0f; static float SMALL_WINDOW_SIZE =2.0f; static float LARGE_WINDOW_SIZE = 5.0f; static float SQ_FT_PER_GALLON = 375.0f; public static void main(String[] args) { // declare all variables to be used (I provide one to get you started.) int gallons; int width, length, height, doors, int grossSquareFeet, // give welcome and instructions to user System.out.println("Welcome to the Painters Helper! ); Scanner input = new Scanner(System.in); System.out.println("Please enter the room's width:"); width = input.nextInt(); grossSquareFeet = height * 2 * (length + width); netSquareFeet = (int)(grossSquareFeet) - (int)(((doors * DOOR_SIZE) +....)); gallons = ... System.out.println("\nYou will need about " + gallons + " gallons of paint."); } // end of method main } // end of class PaintersHelpeLast edited by Natrix; 04-05-2009 at 04:36 PM.
- 04-05-2009, 04:25 PM #8
Member
- Join Date
- Dec 2008
- Posts
- 32
- Rep Power
- 0
Natrix i dont think is a good idea to help someone like that psycho...u can also practice without posting the solution
-
- 04-05-2009, 04:37 PM #10
Member
- Join Date
- Mar 2009
- Posts
- 40
- Rep Power
- 0
Ok I edited the code and he can do the rest on his own.
-
Thanks for the change.
If you want a chuckle and to see another "bad" post, run my little program for the OP posted in this thread here:
Help
- 04-05-2009, 04:46 PM #12
Member
- Join Date
- Mar 2009
- Posts
- 40
- Rep Power
- 0
I love it. :)
- 04-06-2009, 02:03 AM #13moostico246 Guest
thanx natrix...well im a biology major and my teachers an ass. but i appreciate the help.
-
edit: nevermind
Last edited by Fubarable; 04-06-2009 at 02:07 AM.
- 04-06-2009, 02:12 AM #15moostico246 Guest
can u do this code?
-
Sure, I can do it easily, so can Natrix, so can Darryl, etc...
The issue is, can you do it. We won't do it for you, of course, and vague or general questions are usually answered with links to a tutorial, but we can help answer specific questions. Though your behavior to Darryl leaves a lot to be desired and will surely motivate many of us not to help you until we see some change and an apology.
- 04-06-2009, 02:21 AM #17moostico246 Guest
im not really a computer freak lke u, but im juss tryena get dis assignment out da way so i could study for some other reall classes...so can u HELP me with my code, its a YES or NO...and if not, dont try ta get smart here..perioddd
-
Listen squirt, you're asking for free help here, meaning you don't get to dictate the terms. You're also doing your best to act like a total jerk, so I doubt you'll get anyone here to do your coding for you, much less give you the time of day. Why don't you just pull on your big-boy pants and learn to do your work on your own.and if not, dont try ta get smart here..periodddLast edited by Fubarable; 04-06-2009 at 02:29 AM.
- 04-06-2009, 02:29 AM #19moostico246 Guest
look ur juss a fat white boy, anyways if anyones out there can u help me out here
-
Similar Threads
-
I need help on a practice code for java
By Sageinquisitor in forum New To JavaReplies: 12Last Post: 07-13-2010, 04:00 PM -
[SOLVED] Is this good programming practice?
By porchrat in forum New To JavaReplies: 9Last Post: 04-08-2009, 12:54 PM -
[SOLVED] Best practice for creating test classes
By mwildam in forum New To JavaReplies: 3Last Post: 08-27-2008, 04:59 PM -
Best practice of IF loop with NOT
By sathishranganathan in forum Advanced JavaReplies: 13Last Post: 05-29-2008, 12:11 PM -
Web Services - IBM Expands SOA Management Practice
By Felissa in forum Web FrameworksReplies: 0Last Post: 06-25-2007, 04:08 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks