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
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; Smart Phone my phone, her_phone; public int run() return status; } public class Person { private int ID; Computer c; public class Super Computer extends Computer (; } public class Laptop extends Computer private string Model; } } public class Phone { private int SerialNo; Computer c1, c2; public class Smart Phone extends Phone { ; } public class Iphone extends SmartPhone. { private start() {; } }
Step by Step Solution
3.43 Rating (169 Votes )
There are 3 Steps involved in it
Explanation The Computer class has a private attribute name and two public methods run and a constru... View full answer
Get step-by-step solutions from verified subject matter experts
