Skip to content

chupa-ilona/jv-immutable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jv-immutable


There are three classes: Car, Engine, and Wheel. Make class Car immutable.

  • Implement method changeEngine(Engine engine), which will allow you to upgrade your car, and you will be like Vin Diesel:)
  • Implement method changeColor(String newColor).
  • Implement method addWheel(Wheel newWheel). Our car can have as many wheels as possible. Even 10 wheels)

You also should implement equals() and hashCode() methods and constructor with all arguments in all classes, in order for the tests to run correctly.

Try to avoid these common mistake while solving task

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%