Results 1 to 4 of 4
Thread: Homework help
- 09-10-2012, 04:37 AM #1
Member
- Join Date
- Sep 2012
- Posts
- 2
- Rep Power
- 0
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!
-
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.
- 09-10-2012, 05:53 AM #3
Member
- Join Date
- Sep 2012
- Posts
- 2
- Rep Power
- 0
Re: Homework help
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));
}
}
- 09-10-2012, 06:24 AM #4
Re: Homework help
Forum Rules -- particularly the third paragraph
Guide For New Members
BB Code List - Java Programming Forum
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Need help with homework
By bkim33 in forum New To JavaReplies: 9Last Post: 02-11-2011, 04:50 AM -
Need some help with my homework.
By JacobM in forum New To JavaReplies: 11Last Post: 02-04-2011, 02:42 AM -
Help me pls It is my homework:(
By pinar in forum New To JavaReplies: 3Last Post: 10-19-2010, 10:11 PM -
help with homework
By pinkdiamondgail in forum Advanced JavaReplies: 7Last Post: 04-07-2009, 01:34 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks