ITEC 1620 Lecture : ReferencesTutorial.pdf

43 views4 pages

Document Summary

The file oneint. java contains the following implementation of the oneint class: public class oneint. The file twoints. java contains the following implementation of the twoints class: public class twoints public int int1; public oneint int2; public twoints (int int1, oneint int2) The main method in the file mainclass. java uses the above classes: public class mainclass. // part 1 draw the object diagrams at this time x. value = 3; x = new oneint(8); a. int1 = y. value; y = a. int2; a. int2 = new oneint(9); // part 2 draw the object diagrams at this time public int value; public oneint (int value) public static void main(string[] args) Part 1: draw the object diagrams for all identifiers of oneint and twoints when the comment line // part 1 draw the object diagrams at this time is reached. The file anint. java contains the following implementation of the anint class: public class anint. The file moreints. java contains the following implementation of the moreints class: public class moreints.