"Create a class called compartment which represents the ship compartments with attributes like height, width and breadth.
To avoid conflict create this class in a new package called com.wipro.automobile.ship
"
Answers
Answered by
3
Answer:-
The program is written in java:-
import java . io . * ;
public class compartment
{
float height ;
float width ;
float breadth;
public compartment( float height , float width , float breadth )
{
height=this.height ;
width=this.width ;
breadth=this.breadth ;
}
}
Similar questions