Question: JAVA only. Instructions Write a Java class named Ship to meet the requirements described in the following UML Class Diagram Ship Attributes private name: String

JAVA only. JAVA only. Instructions Write a Java class named Ship to meet

the requirements described in the following UML Class Diagram Ship Attributes private

Instructions Write a Java class named Ship to meet the requirements described in the following UML Class Diagram Ship Attributes private name: String private type: String private year: int private builder: String Name of the ship Type of the ship Year of build Builder company Operations Ship(name: String, Default or null constructor Constructor accepting four(4) parameters. Returns a fully formed and fully functional Ship object reference type: String, year: int, builder: String): Ship public setName(aName: String): void public setType(aType: String): void public setYear(aYear: int): void public setBuilder(aBuilder: String): void Accepts a String object(local name:aBuilder) and assigns public getName: String Accepts a String object(local name:aName) and assigns it to the instance variable name Accepts a String object(local name:aType) and assigns it to the instance variable type Accepts an int value(local name:aYear) and assigns it to the instance variable year it to the instance variable builder Returns the current value of instance variable name Returns the current value of instance variable t Returns the current value of instance variable year Returns the current value of instance variable builder Strin ublic getT public getYearl): int public getBuilder): String Returns a formatted String containing a 'state report that is, the current values of each of the object's instance variable public toString:String

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!