Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

Ensure continued excellence in people management.

Answered: 1 week ago

Question

Enhance the international team by recruiting the best people.

Answered: 1 week ago