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

Manu WIP #11

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

Manu WIP #11

wants to merge 12 commits into from

Conversation

manukj
Copy link

@manukj manukj commented Nov 17, 2019

completed Assignment 1,2,3,4

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.

Ok.
Need not add binary files in git

Comment on lines +35 to +47
if (type.equals("raw")) {
// raw: 12.5% of the item cost
this.tax = (double) (0.125) * price;
} else if (type.equals("manufactured")) {
// manufactured: 12.5% of the item cost + 2% of (item cost + 12.5% of the item
// cost)
this.tax = (double) ((0.125) * price) + (0.2 * (price + (0.125 * price)));
} else if (type.equals("imported")) {
import_tax = (double) (0.1) * price;
tot_price = price + import_tax;
double super_charge = (tot_price <= 100) ? 5 : (tot_price <= 200) ? 10 : 0.5 * (tot_price);
this.tax = import_tax + super_charge;
}
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.

class TestAssignment1 {

@Test
void test_for_type_row() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Must write test for edge cases also.

Q-1,2,3,4/src/Assignment2/StudentController.java Outdated Show resolved Hide resolved
Q-1,2,3,4/src/Assignment2/StudentController.java Outdated Show resolved Hide resolved
@Order(1)
@DisplayName("Validating String and Empty field")
void test_String_and_Empty_Field() {
Input input = new Input();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Expect more test cases.

import java.util.Map;
import java.util.Scanner;

public class DependencyGraph {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can improve on code structure.

Q-1,2,3,4/src/Assignment4/DataBase.java Show resolved Hide resolved
Comment on lines +33 to +45
if (type.equals("raw")) {
// raw: 12.5% of the item cost
this.tax = (double) (0.125) * price;
} else if (type.equals("manufactured")) {
// manufactured: 12.5% of the item cost + 2% of (item cost + 12.5% of the item
// cost)
this.tax = (double) ((0.125) * price) + (0.2 * (price + (0.125 * price)));
} else if (type.equals("imported")) {
import_tax = (double) (0.1) * price;
tot_price = price + import_tax;
double super_charge = (tot_price <= 100) ? 5 : (tot_price <= 200) ? 10 : 0.5 * (tot_price);
this.tax = import_tax + super_charge;
}
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 java inheritance property

@abhinav-adtechs abhinav-adtechs added the scope for improvement scope for improvement label Nov 18, 2019
@abhinav-adtechs abhinav-adtechs added the review done review done label Nov 19, 2019
@manukj