Skip to content

Alefas/complex-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task

  1. Checkout Project (In case if you need project stub)
  2. Implement in YourNameComplex.scala file
  3. Send it by e-mail: [email protected]
  4. Deadline is 27 September 2012, 21:00

Task details

Implement case class Complex(re: Double, im: Double).

  1. It should contain following operators: +, -, *, /, unary_+, unary_-, ^. Override toString method.
  2. Complex companion should contain I constant. And possibility to write code like Re(z), Im(z). Also add methods conjugation, sqrt, abs.
  3. Add auxiliary constructor from String.
  4. It should be possible to use all operators with other numeric types on the left and on the right side.
  5. Note that for every task part you can write code with any implementation and complexity (like two sqrt values or one). All of this is up to you.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published