Skip to content

Add files via upload#398

Closed
code-with-binyam wants to merge 1 commit into
TheAlgorithms:masterfrom
code-with-binyam:master
Closed

Add files via upload#398
code-with-binyam wants to merge 1 commit into
TheAlgorithms:masterfrom
code-with-binyam:master

Conversation

@code-with-binyam

Copy link
Copy Markdown

is it possible to pull?

@christianbender

Copy link
Copy Markdown

@code-with-binyam Yes of course. You can send pull requests. Please add your file in the directory Others

@christianbender christianbender left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution and Good Work! I have some requests

Comment thread LawnMowing.java
public class LawnMowing{
public static void main ( String [] args){

Scanner input = new Scanner (System.in);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lines must be indent.

Comment thread LawnMowing.java
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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the indent according to the lines above.

Comment thread LawnMowing.java
System.out.print ("\n Length: ");
double length = input.nextDouble();
System.out.print ("Width: ");
double width = input.nextDouble();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lines must be indent according to the main-method.

Comment thread LawnMowing.java
int payment = input.nextInt();

double lawn = length*width;
double wcost = 0.0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lines must be indent according to the main-method.

Comment thread LawnMowing.java

double lawn = length*width;
double wcost = 0.0;
if (lawn < 4000) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent, too.

Comment thread LawnMowing.java
if (lawn < 4000) {
wcost = 25;}
else if (lawn >= 4000 && lawn < 6000) {
wcost = 35;}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the curly brace in the next line.

Comment thread LawnMowing.java


if ( payment == 1) {
costp = costt;}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the curly brace in the next line.

Comment thread LawnMowing.java
costp = (costt/20);}


System.out.printf (" \n Your lawn is %.2f ", lawn);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent this lines according to the main-method.
Java code style conventions: http://www.oracle.com/technetwork/java/codeconvtoc-136057.html

Comment thread LawnMowing.java



}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last curly brace in the next line.

Comment thread LawnMowing.java
wcost = 50;}
double costt = wcost*20;
double costp = 0.0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put in comments in your code. Because your code would more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants