Read below and respond with your own thought in 150 words. Object Oriented Programming (OOP) is
Read below and respond with your own thought in 150 words.
—————————————————————————————————————————–
Object Oriented Programming (OOP) is the programming idea that utilizes the concepts of objects, methods, and classes. OOP is used to establish essentially what are commonly referred to as classes, or in other words the "blueprints". Classes are used to develop objects and may cover an array of categories that are broadly defined and share similar characteristics.
An example of a class could be written as such:
public class Student{
String firstName;
String lastName;
int age;
}
This class represents the attributes that would make up the information of a student.
Objects are created from classes and are individual segments that are comprised of the classes listed attributes.
An example of an object, using the information from the previous example could be shown as:
public class Student{
String firstName;
String lastName;
int age;
}
public static void main(String[] args) {
Student myClassmate = new Student();
myClassmate.firstName = "John";
myClassmate.lastName = "Smith";
myClassmate.age = 23;
System.out.println(myclassmate.firstName);
Here we have an object that is comprised of the attributes defined by the class "Student"
A method is a block of code that can be used to perform a task or function.
An example could be written as such:
public static void main(String[] args) {
method();
}
public static void method() {
System.out.println("Hello World");
}
When executed, the system recognizes the method that states that it should print out the words "Hello World". By using the method(); it will execute everything that was defined by that method.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
