Tuesday, October 13, 2009

Re: [Java] Please hep me writing my first java program!!

 

First of all, I don't see what you have already written for this problem, it's hard for me to pin point what is not correct. 
Can you show you solution and we can go from there.
Thanks and regards
Jia Jiunn Wong

________________________________
From: Preyas Patel <patelpreyasi@yahoo.co.in>
To: Java_Official@yahoogroups.com
Sent: Sunday, October 11, 2009 5:27:06 PM
Subject: [Java] Please hep me writing my first java program!!

 
Q. Write a Java program that reads in the length and width of a rectangular yard and the length and the width of a rectangular house situated in the yard. Your program should compute the time required (In minutes) to cut the grass at the rate of 2.3 square meters a second.
Output Format:
Yard Length: ________
Yard width: _________
Yard Area: ________
House Length: ________
House Width: ________
House Area: _________
Grass Area: __________
Cutting Time: ________

The above is the question of my assignment and I have came up with below algorithm.
1 Input the length of yard
2 Input the width of yard
3 Input the length of house
4 input the width of the house
5 Area of the House ß Length of the house * Width of the house
6 Area of the Yard ß Area of the house – (Length of the yard * Width of the yard)
7 Time Required cutting the grass ß Area of yard/2.3 m. square/sec/60
8 Print Times

I tried really hard to write program but I don't know I am having problem and I can't get it correct. Well this is my first ever java assignment so I found it little hard for me. So if you please can help me writing the program.

Regards, ------------ --
Preyas Patel
B.S. Computer Science
California State University, Northridge
+ 1 619 200 4818
patelpreyasi@ yahoo.co. in
patelpreyas2@ gmail.com

From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo. com/trynew

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
Recent Activity
Visit Your Group
Give Back

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

No comments:

Post a Comment