Skip to main content

CPT 307: Data Structures & Algorithms - Week 1!

 Hello World!

I am back in the blogosphere after several months. The present course is called "Data Structures & Algorithms" and this week's focus is centered around installing Java and reviewing object-oriented design principles. 

Thankfully the instructions embedded within the course made the installation of Java and IDE (integrated development environment) NetBeans seamless. The links provided to each website were straightforward (for the most part): 

NetBeans (version 16): https://netbeans.apache.org/download/index.html

Java (version 19): https://www.oracle.com/java/technologies/downloads/

The 4 major principles of Object-Oriented Programming: 

1) Encapsulation - The hiding of data implementation by restricting access to accessors and mutators. The pieces that surround the data that forms the class. An Accessor is a method that is used to ask an object about itself (Lewallen, 2005). This is typically in the form of properties. Mutators are public methods used to modify the state of an object while simultaneously shielding how the data is modified. 

2) Data Abstraction - The development of classes, objects and types in terms of their interfaces and functionality. (Closely related to encapsulation). It is used to manage complexity such as to decompose complex systems into smaller components. 

3) Polymorphism - One name, but many forms. This concept manifests itself by having multiple methods all with the same name - but slightly differing functionality. There is the overriding type (run time) and the overloading type (compile time). With overloading, the compiler determines what method will be executed when the code is compiled. The method that will be used for overriding is determined ar runtime based on the dynamic type of an object (Lewallen, 2005). 

4) Inheritence - This concept refers to how objects are related to each other. Inheritance pertains to the  "is a" relationship between objects. The Lewallen (2005) article likens this concept to the example of a library. A library lends out books as well as magazines and audio tapes. The library assets have their own class definition. Inheritance allows you to inherit functionality from another, called a superclass or base class (Lewallen, 2005). 


Michael Streat 

References:

Java T Point. (n.d.). Java OOPs concepts Links to an external site.. Retrieved from http://www.javatpoint.com/java-oops-concepts 

Lewallen, R. (2005). 4 major principles of object-oriented programming Links to an external site.[Blog post]World Documents. https://vdocuments.net/4-major-principles-of-object.html 

Oracle. (2015). Lesson: Object-oriented programming concepts Links to an external site.. Retrieved from http://docs.oracle.com/javase/tutorial/java/concepts/index.html 


Comments

Popular posts from this blog

Network Security

    With the advent of computers and the internet, so too came the invention of harmful scams. These malicious entities have become more and more prevalent since the turn of the century and exist in various forms. From existing in different types of computer viruses, spam emails, phishing, and Denial of Service (DoS) attacks there are a multitude of ways for user’s personal information to be accessed and disseminated without knowledge or consent.               During week 3 of our course we learned about ping commands and even practiced using these to access different websites. This week’s venture into security took the concept even further by revealing how one can use ping commands in a negative and harmful way in the form of Denial of Service (DoS) attacks. These types of security breaches require no hacking of any kind, nor does it involve the installation of any type of malicious software which is also known ...

Applying Algorithmic Design & Data Structure Techniques

   This week's resource article describes an algorithm as, "a procedure that you can write as a C function or program, or any other language. An algorithm states explicitly how the data will be manipulated." (Complexity Analysis, n.d.).    The length of time a program takes to complete a given task depends on its algorithm. The algorithm deals with how data is organized and how it is accessed. The biggest considerations for creating applications are time complexity and space complexity.     With time complexity, this refers to the number of operations needed and the time it takes it takes for them to run. This is typically measured in milliseconds. Operations are typically: 'compare', 'swap', 'fetch from memory' and 'send to memory'. While each operation takes only a small amount of time; the number of operations that are necessary grow exponentially. As the list of operations grows, so too does the time it takes for them to be enacted.    ...