Question: Can you help me solve the questions? With java. I want only between H And L Public class PortDeBouc { string shipname. int build ng:

Can you help me solve the questions? With java. I want only between H And LCan you help me solve the questions? With java. I want only

Public class PortDeBouc { string shipname. int build ng: string former name statis string county="Marsilya"; h. If another class extends this class. which variable can not be directly used? (3 pts) i. If we cun this program, what is the output? (3 pts) public PortDeBous(String name, int r, string eski) { shipname=name; build no=r; former.name = eski; } j. You see that the boat Heybeliada also built in PortDeBous, former name Degirmen was constructed later. Its serial number is 58. How can you instantiate this as Prenses? (3 pts) void displayit O{ System.out.println(shipname+" "-build. ng** *+formelsame+""+sounts); k. If we smit the following three lines will the program cun? If so, what is the output now) (3 ots) PortDeBoys(String n, int r, string eski) { shipname=name; build no=r; former name = eski; } } Rublic statis veid main(String args[]) { PortDeBous Boat1 = new PortDeBous("Moda", 41, "Fener"); PortDeBouc Boat2 = new PortDeBoys("Kadikoy",42,"BogaHeykeli"); PortDeBous Boat3 = new PortDeBous("Burgaz, 43, "Kalpazankaya"); Boat1.displayit(); Boat2.displayit(); Boat3.displayit(); } + Answer the following: Is there encapsulation here? If so where? (3 points) a. Is there polymorphism? Where? (3pt). 1. b. Identify the class name (3 pt). Write a header and two methods for a class Akay that inherits this class, adds getFormer name and setFormer name_method headers that sets and gets the former name of the boat as strings. Only headers are required. (5 points). c. Identify statement or statements that act as constructor(s) (3 pt) d. How many item(s) elements is(are) instantiated? Name them please. (3 pts) e. What is the name of the method? (2 pts) f. Why do we declare displayit and main with the void attribute? (ots) g. Why do we declare main with the static attribute? (2 pts)

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!