Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuclei Assignments #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wagmitasharma
Copy link

No description provided.

@abhinav-adtechs abhinav-adtechs added the review pending review pending label Nov 19, 2019
Copy link
Collaborator

@abhinav-adtechs abhinav-adtechs left a comment

Choose a reason for hiding this comment

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

Okay.

@@ -0,0 +1,14 @@
eclipse.preferences.version=1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't commit IDE configs, generated code and binary files in git.

Copy link
Author

Choose a reason for hiding this comment

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

okay.

Comment on lines +21 to +25
for(int j=0;j<3;j++) {
if (sc.hasNextInt()) { quantity=sc.nextInt();}
else if (sc.hasNextDouble()) { price=sc.nextDouble();}
else if (sc.hasNext()) { type=sc.next();}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using Streams API. And try to remove if else inside the for-loop.

Copy link
Author

Choose a reason for hiding this comment

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

sure sir.

Comment on lines +29 to +44
if (type.equalsIgnoreCase("raw")){
tax=calRawTax(price);
cost=(price+tax)*quantity;
}
else if (type.equalsIgnoreCase("manufactured")){
tax=calManufacturedTax(price);
cost=(price+tax)*quantity;
}
else if (type.equalsIgnoreCase("imported")){
tax=calImportedTax(price);
cost=(price+tax)*quantity;
}
else {
System.out.println("Invalid item type.");
continue;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider leveraging java's inheritance property to make the code cleaner and scalable.

Assignment1/src/module-info.java Show resolved Hide resolved
Assignment2/src/asgn2/Assignment2.java Outdated Show resolved Hide resolved
Assignment2/src/asgn2/User.java Outdated Show resolved Hide resolved
@abhinav-adtechs abhinav-adtechs added review done review done scope for improvement scope for improvement and removed review pending review pending labels Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review done review done scope for improvement scope for improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants