Skip to content

code-differently/JS-TDD-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

JS TDD Lab

Directions

Using Test Driven Development(TDD), build the classes below. Remember, you need to write the test case before writing the source code when using TDD. You should have getters and setters for every attribute in a class.

Note: Getters, Setters, and Constructors do not need to be tested

Rectangle

  • getPerimeter()
  • getArea()
  • isSquare()

Calculator

  • getTotal()
  • add(num)
  • subtract(num)
  • multiply(num)
  • divide(num)
  • clear()

Tesla

  • getCharge()
  • charge(percentage) Increases the charge by the percent provide, max 100%
  • fullyCharge() Increases the charge to 100%
  • drive(miles) Note: The charge deplets 1% every 2 miles you drive

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors