Skip to content

Commit

Permalink
Revert "feat: adds Pablo's Lesson06 expression calculator (#252)" (#255)
Browse files Browse the repository at this point in the history
This reverts commit 8518c24.
  • Loading branch information
anthonydmays authored Oct 9, 2024
1 parent 8518c24 commit 10cd918
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions lesson_06/expression/src/expression_calculator.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
export class ExpressionCalculator {
/** Returns the calculation of ((a + b) * c) / d^e */
calculate(a: number, b: number, c: number, d: number, e: number): number {
const addition = this.add(a, b);
const multi = this.multiply(addition, c);
const exponent = this.pow(d, e);
const division = this.divide(multi, exponent);
const mytotal = division;
return mytotal;
}
// Implement your code here to return the correct value.
add(a: number, b: number): number {
return a + b;
}
multiply(a: number, b: number): number {
return a * b;
}
divide(a: number, b: number): number {
return a / b;
// Implement your code here to return the correct value.
return 0;
}

pow(base: number, exponent: number): number {
return Math.pow(base, exponent);
}
Expand Down

0 comments on commit 10cd918

Please sign in to comment.