Question: classes: Observe the given Java code properly and draw the class diagram and object diagram using both the public class student private int id=50989;

Observe the given Java code properly and draw the class diagram and object diagram using both the public

classes: Observe the given Java code properly and draw the class diagram and object diagram using both the public class student private int id=50989; private String name="xyz"; private teacher phone; student() { phone-new teacher(); } void print() { System.out.println(name); phone.display(); } public class teacher { private int phone; private String name; private double marks; void display() } System.out.println(phone);//f } void show() { System.out.println(id); print(); }

Step by Step Solution

3.40 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is t... View full answer

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 Programming Questions!