Results 1 to 4 of 4

Thread: Homework help

  1. #1
    cubs29 is offline Member
    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Default Homework help

    I have a homework assignment that I am finding very difficult to do using jgrasp. Here is the question:

    Create a class names Assignment1b. This class will prompt the user to enter the length and width of a rectangular parcel of land. This program will then compute the square feet and the corresponding acreage based on the fact that one acre equals 43,560 square feet. After the program has computed the acreage, it will report that results to the user as shown below.

    Compile and run your program three times, once with each of the following value:
    length 120, width: 363
    length 0, width: 0
    length 250, width 250

    Here is what your output should look like:

    ---jgrasp exec: java Assignment1b

    Enter the length: 120
    Enter the width: 363

    A rectangular parcel of land having
    length 120 feet and width 363 feet
    has an area of 43560 square feet
    which is 1.0 acres

    ---jgrasp: operation complete.

    Thank you for your help!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Homework help

    Please don't simply dump homework here without showing your work and asking a specific question. Many here take this to mean that you want someone to do this assignment for you, and that's not how things work here. I'm sure that's not what you meant, so to make this a proper answerable question, please put some effort into your question including by telling us where exactly you are stuck, and what exactly do you not understand about the assignment.

  3. #3
    cubs29 is offline Member
    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Default Re: Homework help

    Quote Originally Posted by Fubarable View Post
    Please don't simply dump homework here without showing your work and asking a specific question. Many here take this to mean that you want someone to do this assignment for you, and that's not how things work here. I'm sure that's not what you meant, so to make this a proper answerable question, please put some effort into your question including by telling us where exactly you are stuck, and what exactly do you not understand about the assignment.
    That's now what at all what I was doing.

    I feel like I'm kind of getting but I still don't know what to plug in...

    import java.util.Scanner;

    public class Assignment1b
    {
    public static void main(String[] args)
    {
    System.out.print("Enter the length then width of land you wish to compute in feet");

    int L1, W2;

    Scanner keyboard = new Scanner(System.in);
    L1 = keyboard.nextInt();
    W2 = keyboard.nextInt();

    System.out.println("The area of land in square feet is");
    System.out.println(L1 * L2);

    System.out.println("In square acres that is equal to");
    System.out.println(43560 / (L1 * W2));
    }
    }

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: Homework help

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Need help with homework
    By bkim33 in forum New To Java
    Replies: 9
    Last Post: 02-11-2011, 05:50 AM
  2. Need some help with my homework.
    By JacobM in forum New To Java
    Replies: 11
    Last Post: 02-04-2011, 03:42 AM
  3. Help me pls It is my homework:(
    By pinar in forum New To Java
    Replies: 3
    Last Post: 10-19-2010, 11:11 PM
  4. help with homework
    By pinkdiamondgail in forum Advanced Java
    Replies: 7
    Last Post: 04-07-2009, 02:34 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
  •