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 ...

Traveling Through a Network

  Hi World,        Ping Command Activity – This was a great exercise that highlighted how ping commands work in a hands-on way. I enjoy being able to play around with topics we are learning about. Here are the screenshots of my ping results. The two other websites beyond google was the official Australian government response website: Australian.gov.au and the official website of the government of Japan: Japan.go.jp         I was rather shocked to see that the ping to Japan was the quickest when compared to google and the Australian website! The average speed for Japan was 24.025 ms (milliseconds). Google’s average speed was 24.474 ms and the Australian site’s average was 188.582 ms. Given how far away those countries were I expected them to take longer because there is so much more distance that needs to be traversed. Given that the Australian ping took the longest was expected, but the fact google sits in the middle is a surpr...

SCRATCH - My Experience

  Here is the URL link to my Scratch program:   https://scratch.mit.edu/projects/678680203   My Scratch short program project was a total of 36 blocks. This process seemed like it would be extremely easy at first, but I soon realized it was not quite as simple as previously thought! The moment I created my account I went right into the video tutorial section and quickly began thinking about what I wanted to do. The video tutorials were presented in an easy-to-digest fashion. The website design overall was easy to navigate, and I found everything to be the epitome of the term: “user-friendly”.               The most difficult part of my experience with Scratch was getting the timing of my program project right. I wanted my project to feel like a scene of a tv show. For everything to play on continuously with the click of one button. Getting it started was the easy part, but the real trouble began when I star...