Saturday, September 22, 2012

Programming With Java And Data Structures

My Data Structures Class

      I've been pretty busy lately with the labs I need to finish that are assigned to me every week. Each lab is more and more difficult than the last but the stuff you learn is cool as shit. I'm working on this method that adds an element that is of a parameterized type. 
      A parameterized type basically consists of a class or interface identifier followed, in angle brackets by a list of one or more class identifiers.

Parameterized Type:

            ArrayList <Double> gpaList = new ArrayList <Double>();
            (Class or Interface)  (Class Identifiers)     (Holds collection of GPAs)

      A parameterized type can also be called a generic type, they apparently improve your productivity as a programmer. For the lab I'm working on I'm given an interface MiniCollection and another interface that derives from it (MiniList) and I have to create a class called ArrayCollection that implements both of these interfaces. The parameterized type is something I'm going to have to utilize a lot in this lab for the ArrayCollection methods.


No comments:

Post a Comment