Skip to content

Commit

Permalink
Modified comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Ramakrishnan committed Nov 7, 2016
1 parent 30d085c commit 321268f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
Binary file modified .DS_Store
Binary file not shown.
40 changes: 20 additions & 20 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions src/Fraction.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class Fraction {

/**
* Public constructor
*
*
* @param w The whole part of this fraction
* @param n The numerator of this fraction
* @param d The denominator
* @param d The denominator of this fraction
*/
public Fraction(int w, int n, int d) {

Expand All @@ -24,18 +24,34 @@ public Fraction(int w, int n, int d) {
setdenominator(d);
}

/**
*
* @return an int representing the whole part of this fraction
*/
public int getWhole() {
return whole;
}

/**
*
* @return an int representing the numerator of this fraction
*/
public int getNumerator() {
return numerator;
}

/**
*
* @return an int representing the denominator of this fraction
*/
public int getdenominator() {
return denominator;
}

/**
*
* @param d the new value of the denominator
*/
public void setdenominator(int d) {

if (d != 0) {
Expand Down

0 comments on commit 321268f

Please sign in to comment.