Skip to content

Silwhoon/Raindrops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tech Test

Raindrops

A project that takes an integer as its input and converts it to a string containing various sounds of a raindrop based on its factors.

Description

This project will take any integer input and return a string based on its value.

  • If the input has a factor of 3, the returned string will have 'Pling' appended to it.
  • If the input has a factor of 5, the returned string will have 'Plang' appended to it.
  • If the input has a factor of 7, the returned string will have 'Plong' appended to it.
  • If the input does not have a factor of 3, 5 or 7 the number will be returned as a string.

Examples

  • 28's factors are 1, 2, 4, 7, 14 and 28: this would return a simple 'Plong'
  • 30's factors are 1, 2, 3, 5, 6, 10, 15, 30: this would return a 'PlingPlang'
  • 34 has four factors: 1, 2, 17, and 34: this would return '34'

Mutation Testing

Mutation Coverage Current tests include full line coverage - except a class that contains a statically called method which is unable & unnecessary to test.

To produce a report run the following command: mvn test-compile org.pitest:pitest-maven:mutationCoverage in your terminal.

About

Converts an input integer to a string based on its factors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages