Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

This week in Unit 5 I learnt quite a lot from all of the activities for this week which included

first of all the reading assignment, discussion assignment, programming assignment, I


watched several videos that were included in the module and several other videos, but some
of the concepts were quite evasive I had to ask around and glean information from fellow
classmates and also from doing a lot of googling and using stackoverflow.

From what I read this week I got to learn quite a lot of new information on particularly
generic programming, namely Sections 10.2: Lists and Sets, 10.3: Maps, and Section 10.4:
Java Collection Framework Programming. ArrayList and LinkedList both represent object
types of the kind.

In addition, ArrayList uses random access as necessary. The LinkedList is a representation of


items that are linked in a particular order. It contains a first item in the list and also a last
item arranged in a particular order. The first item in the list will be near the top or at the
beginning of the list. The method for sorting is java.util.Collections. The method
Collection.sort(List) is used to sort the items, ascending order sorting is used which begins
with the smallest and then ending with the largest item. The collection.sort's other method is
the comparator (List.comparator). With lists you can use different methods to access the
items in the objects. Some of these methods include list.get() and for setting items in the
list.set().

This week was an interesting one though not void of challenges of its own. I learnt that in
generic programming we will be working with objects, the parameters that are entered must
be objects, therefore if primitive types are to be used, then wrapper classes must be used.
There are also sets for which a set is a collection of objects in which no object more than
once. There are TreeSets and HashSets, in the former the items are arranged in sorted
ascending order and in the latter there is no ordering they are just occupying random places.
Priority Queues are another abstract data type which also represents a collection of items in
which priority is given to one which allows for two items to be compared there are a number
of operations that can be performed on them which include adding objects, removing of
objects and checking whether there are any items in the list. Maps are also another class used
in generic programming and they work like dictionaries where arbitrary objects of type T are
associated with other objects of type S in the form of a key, value pair in which the key can
be used to search for the value.
The feedback that I received was great and quite balanced and i was helpful in understanding
some of the concepts that were not easy for me to get. I felt encouraged when the programs
that I wrote ran, especially for the written assignment.

My programming skills are being refined, I can now read code and understand what it does
much better than when I began the course, I guess my analytical and critical thinking skills
are undergoing a major boost. I am beginning to realise that when I really focus and pay
attention without being distracted, I can learn very fast and if I tell myself that whatever I’m
learning is not difficult, the learning process seem to become much simpler.

I am able to apply these concepts in my daily life, for example I can make applications that
can make the day to day activities that I do become easy, for example I wrote an app that
enables me to san documents and extract the information that I want.

Reference:

Eck, D. J. (2019). Introduction to programming using Java, version 8.1. Retrieved


fromhttp://math.hws.edu/javanotes

You might also like