Question: squares for each class and Description Look at the code below. You have four classes: O, X, T, and M and a variable of each:

 squares for each class and Description Look at the code below.

squares for each class and Description Look at the code below. You have four classes: O, X, T, and M and a variable of each: 0 0 = new 0( ) ; X x = new X( ) ; T t = new T( ) ; M m = new M( ) ; The following assignments are all legal (assume that they all compile): m = t; m = x; 0 = t; The following assignments are all illegal (assume that they all cause compiler errors) : o = m; 0 = X; X = 0; 1. (4 marks) What can you say about the relationships between these four classes? Be succinct. 2. (1 mark) Draw a very simple class diagram that illustrates the hierarchy. That's it! Good luck, watch your time, and have fun

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