Answer:
Due to error while posting the answer, the code snippet is attached as pdf file
Explanation:
The code is written in Java and it is an abstract class.
It starts by defining abstract class with the keyword "abstract".
Then it declare two field for shipName and shipYear.
Then a two arguments constructor is defined.
After that the setter and getter method is declared. The getter and setter is also known as accessor and mutator.
Then a String representation of Ship objects is done by overriding the to String method.