Question: Draw a class diagram for the following code. Your diagram must include the classes their attributes, visibility (private/public), methods, association, generalization, aggregation and multiplicity according
Draw a class diagram for the following code. Your diagram must include the classes their attributes, visibility (private/public), methods, association, generalization, aggregation and multiplicity according to the code below. public class Computer {string name; Person p; Phone phl; SmartPhone my_phone, her_phone; public int run() {return status;}}} public class Person {private int ID; Computer c;} public class Supercomputer extends Computer {;} public class Laptop extends Computer {private string Model;} public class Phone {private int SerialNo; Computer c1, c2;} public class SmartPhone extends Phone {;} public class Iphone extends SmartPhone {private start() {;}}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
