Page 1 of 2 12 LastLast
Results 1 to 20 of 23
  1. #1
    moostico246 Guest

    Default 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

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Quote Originally Posted by moostico246 View Post
    Full credit for a program that compiles and runs correctly.
    Credit where credit's due.

  3. #3
    moostico246 Guest

    Default

    ummm wat,,,,can u do this, yes or no???????????

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default

    Whether he can or can't isn't the issue. The question is, can you?

    db

  5. #5
    moostico246 Guest

    Default

    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..

  6. #6
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default

    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.

    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  7. #7
    Natrix is offline Member
    Join Date
    Mar 2009
    Posts
    40
    Rep Power
    0

    Default

    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 PaintersHelpe
    Last edited by Natrix; 04-05-2009 at 04:36 PM.

  8. #8
    tomiu is offline Member
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Default

    Natrix i dont think is a good idea to help someone like that psycho...u can also practice without posting the solution

  9. #9
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by Natrix View Post
    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.
    Fine, create the code on your own, but don't post it. Don't encourage the OP's behavior! What you have done here is not good, not at all.

  10. #10
    Natrix is offline Member
    Join Date
    Mar 2009
    Posts
    40
    Rep Power
    0

    Default

    Ok I edited the code and he can do the rest on his own.

  11. #11
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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

  12. #12
    Natrix is offline Member
    Join Date
    Mar 2009
    Posts
    40
    Rep Power
    0

    Default

    I love it. :)

  13. #13
    moostico246 Guest

    Default

    thanx natrix...well im a biology major and my teachers an ass. but i appreciate the help.

  14. #14
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    edit: nevermind
    Last edited by Fubarable; 04-06-2009 at 02:07 AM.

  15. #15
    moostico246 Guest

    Default

    can u do this code?

  16. #16
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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.

  17. #17
    moostico246 Guest

    Default

    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

  18. #18
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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.
    Last edited by Fubarable; 04-06-2009 at 02:29 AM.

  19. #19
    moostico246 Guest

    Default

    look ur juss a fat white boy, anyways if anyones out there can u help me out here

  20. #20
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    I'll help you out: It's obvious that you haven't put in any effort into it and are showing no inclination of doing so in the future. So why not just drop the class?

Page 1 of 2 12 LastLast

Similar Threads

  1. I need help on a practice code for java
    By Sageinquisitor in forum New To Java
    Replies: 12
    Last Post: 07-13-2010, 04:00 PM
  2. [SOLVED] Is this good programming practice?
    By porchrat in forum New To Java
    Replies: 9
    Last Post: 04-08-2009, 12:54 PM
  3. [SOLVED] Best practice for creating test classes
    By mwildam in forum New To Java
    Replies: 3
    Last Post: 08-27-2008, 04:59 PM
  4. Best practice of IF loop with NOT
    By sathishranganathan in forum Advanced Java
    Replies: 13
    Last Post: 05-29-2008, 12:11 PM
  5. Web Services - IBM Expands SOA Management Practice
    By Felissa in forum Web Frameworks
    Replies: 0
    Last Post: 06-25-2007, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •