Add files via upload#398
Conversation
|
@code-with-binyam Yes of course. You can send pull requests. Please add your file in the directory Others |
christianbender
left a comment
There was a problem hiding this comment.
Thanks for contribution and Good Work! I have some requests
| public class LawnMowing{ | ||
| public static void main ( String [] args){ | ||
|
|
||
| Scanner input = new Scanner (System.in); |
| System.out.print ("Lawn-mowing service"); | ||
| System.out.print (" \n Please Enter the Length and Width of your lawn: "); | ||
| System.out.print ("\n Length: "); | ||
| double length = input.nextDouble(); |
There was a problem hiding this comment.
Correct the indent according to the lines above.
| System.out.print ("\n Length: "); | ||
| double length = input.nextDouble(); | ||
| System.out.print ("Width: "); | ||
| double width = input.nextDouble(); |
There was a problem hiding this comment.
This lines must be indent according to the main-method.
| int payment = input.nextInt(); | ||
|
|
||
| double lawn = length*width; | ||
| double wcost = 0.0; |
There was a problem hiding this comment.
This lines must be indent according to the main-method.
|
|
||
| double lawn = length*width; | ||
| double wcost = 0.0; | ||
| if (lawn < 4000) { |
| if (lawn < 4000) { | ||
| wcost = 25;} | ||
| else if (lawn >= 4000 && lawn < 6000) { | ||
| wcost = 35;} |
There was a problem hiding this comment.
Move the curly brace in the next line.
|
|
||
|
|
||
| if ( payment == 1) { | ||
| costp = costt;} |
There was a problem hiding this comment.
Move the curly brace in the next line.
| costp = (costt/20);} | ||
|
|
||
|
|
||
| System.out.printf (" \n Your lawn is %.2f ", lawn); |
There was a problem hiding this comment.
Indent this lines according to the main-method.
Java code style conventions: http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
|
|
||
|
|
||
|
|
||
| }} |
There was a problem hiding this comment.
The last curly brace in the next line.
| wcost = 50;} | ||
| double costt = wcost*20; | ||
| double costp = 0.0; | ||
|
|
There was a problem hiding this comment.
Put in comments in your code. Because your code would more readable.
is it possible to pull?