A First Look: Object Oriented Programming (OOP)
a OOP is a concept of using classes and objects to simplify software development. (Java T Point. n.d.). This works via concepts such as objects, class, inheritance, polymorphism, abstraction, and encapsulation.
- What is an "object"? In this context, an object is a real-world entity. Real-world, like a car, a door, a couch, or a laptop. An object can be thought of as a piece of data in memory that can interact with other pieces of data, without needing to control or understand the other pieces of data.
- A "class" is a collection of objects. Since it is a grouping of objects, the class itself does not take up any space. Classes can also be used as blueprints to create objects.
- Inheritance is pretty much as it sounds. When a "sub" object inherits the properties of a parent object.
- Polymorphism is if an object can be expressed in different ways. For example, if someone were to write something, they could write a story, a poem, or a private message in their diary. However, all items are written.
- Abstraction is the concept of showing us only the functionality of what we desire without being bogged down with the inner workings. When you watch TV, you are concerned with the show you are watching (presumably), but not so much with the transistors making it happen. While you are watching the LED lights on your screen, you are not "watching" the LED lights on your screen, if that makes sense.
- Encapsulation is binding or joining data with code into a single unit. (Java T Point. n.d.).
You have likely heard of some OOP languages without knowing it. Some of the most popular OOP languages are Java, C#, PHP, Python, and C++.(Java T Point. n.d.). Probably the most well-known of these languages is Java.
If you are looking at getting into programing. Trying some basic programming with Java will be a great way to get your feet wet. If you are looking to try, you can download the latest version of Java at this link. Once you have it downloaded and installed, try the easy "Hello World" exercise. The page has several helpful links and troubleshooting tips if you run into issues, but keep in mind that the guides were last updated at version 8 of the Java program. As of this writing, we are on version 17, so some of the language may need to be updated, or if you are trying to copy some of the directory paths they use, it will not line up. One common issue you may face is trying to update the directory path. In this case, I recommend opening up your folder, then highlighting the directory path at the top to copy the text version of the address. Then copy and paste that into your command prompt rather than trying to ensure that you type it correctly. You may also be asked to shut off your antivirus when running the program. If you are getting an "access denied" issue, that may be the case. Best of luck!
Chandel, M. (2018 August 15). What are the Four Basic Principles of Object Oriented Programming? Medium. https://medium.com/@cancerian0684/what-are-four-basic-principles-of-object-oriented-programming-645af8b43727#:~:text=What%20are%20four%20basic%20principles%20of%20Object%20Oriented,you%20can%20get%20my%20ebook.%20Buy%20from%20Pothi.com
Java T point. (n.d.). Java OOPs Concepts. Retrieved from https://www.javatpoint.com/java-oops-concepts
Oracle. (2015). The Java Tutorials. Retrieved from https://docs.oracle.com/javase/tutorial/index.html
. Retrieved from http://docs.oracle.com/javase/tutorial/index.html
Comments
Post a Comment