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. 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
Get step-by-step solutions from verified subject matter experts
