Question: public class Cylinder { public void smoothen ( ) { System.out.printin ( Smoothening . . ) ; } } public abstract class Vessel

public class Cylinder {
public void smoothen(){
System.out.printin("Smoothening..");
}
}
public abstract class Vessel
private Engine e;
implements Steerable f
public Engine getEngine (){
return e;
public void setEngine (Engine e){
this.e = e;
public abstract void turnon();
public class Engine {
private Cylinder [] y;
private int cyls =1;
static final int maxCyLinders =12;
public void addCylinder (Cylinder y){
if (cyls maxCyLinders)
this.y[cyls+*-1]= y;
public interface Steerable {
public void turn(String s);
public class Boat extends Vessel {
}
}
}
public void turn(Strings){
System.out.println("Steering"+ s);
public void turnon(){
System.out.println("Turn On!");
}}
public class Factory 1
public void build(){
Boat b = new Boat();
Engine e = new Engine();
boolean needsCylinder = true;
/* Add just one cylinder if needed */
if (needsCylinder){
Cylinder c = new Cylinder ();
c.smoothen();
e.addCylinder (c);
}
b. setEngine(e);
}}
Please create a structural class diagram of the above code. Include all classes, associations (complete with needed cardinalities and needed arrowtips), specializations and realizations. Use www.draw.io to create the diagram,

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!