Question: java program Public class PortDeBouc{ string shipname, int build no; string former name: static string county =Marsilya; public PortDeBouc(String name, int r, string eski){ shipnamo-name;
Public class PortDeBouc{ string shipname, int build no; string former name: static string county ="Marsilya"; public PortDeBouc(String name, int r, string eski){ shipnamo-name; build no=r; former name = eski; } void displayit({ System.out.println(shipname="i+build_no+" **+former_name+""+county); } public static void main(String args[]){ PortDeBouc Boatl = new PortDeBouc("Moda", 41. "Fener"); PortDeBouc Boat2 = new PortDeBouc("Kadikoy" 42, "BogaHeykeli"); PortDeBouc Boat3 = new PortDeBouc("Burgaz", 43, "Kalpazankaya"); Boat1.displayit(); Boat2.displayit(): Boat3.displayit(); 3 Answer the following: Is there polymorphism? Where? (3pt). b. Identify the class name (3 pt). c. Identify statement or statements that act as constructor(s) (pl) d. How many itemts) elements istare) instantiated? Name them please. (3 pts) What is the name of the methode pts)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
