Welcome to Programming 2 - Advanced Object-Oriented Programming!
In your first programming course, you learned about structured programming. This course will use Java to focus on object-oriented programming (OOP). Object-oriented programming builds on the three structures you already know - sequence, selection, and iteration (repetition or looping). To create object-oriented programs, we must first review the concepts in structured programming. We will quickly get into the concept of OOP.
Object-oriented programming (OOP) is a computer programming model that organizes software design around data or objects rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior. OOP focuses on the objects that developers want to manipulate rather than the logic required to manipulate them. This programming approach is well-suited for large, complex, and actively updated or maintained programs.
The organization of an object-oriented program also makes the method beneficial to collaborative development, where projects are divided into groups. Additional benefits of OOP include code reusability, scalability, and efficiency.
Object-oriented programming (OOP) is a programming paradigm that uses objects to represent data and behavior. Objects are self-contained units of code that can be used to create complex programs. OOP is based on the following four concepts:
Encapsulation - Encapsulation is the process of wrapping data and behavior together into a single unit. This makes the data and behavior of an object private, and it prevents other objects from accessing them directly.
Inheritance - Inheritance is the ability of one object to inherit the properties and behavior of another object. This allows developers to reuse code and create more complex objects more quickly.
Polymorphism - Polymorphism is the ability of an object to respond to a message in different ways, depending on its type. This allows developers to create more general-purpose code that can be used with different types of objects.
Abstraction - Abstraction is the process of hiding the implementation details of an object from other objects. This makes the object easier to use and understand, and it allows developers to focus on the object's functionality rather than its implementation.
OOP has several advantages over structured programming, including:
Increased code reusability - OOP allows developers to reuse code by creating objects that encapsulate data and behavior. This can save time and effort, and it can also improve the quality of the code.
Improved code readability and maintainability - OOP makes code more readable and maintainable by grouping related data and behavior together. This makes it easier to understand how the code works, and it makes it easier to make changes to the code without breaking other parts of the program.
Increased scalability - OOP makes programs more scalable by making it easy to add new features and functionality. This is because new objects can be created without affecting the existing code.
Improved performance - OOP can improve the performance of programs by reducing the amount of code that needs to be executed. This is because objects can be used to encapsulate common tasks, and these tasks can be executed more efficiently than if they were executed separately.
Overall, OOP is a powerful programming paradigm that can be used to create more complex, reusable, and maintainable programs.
Course Learning Objectives
(CO-1) Identify and explain a programming development lifecycle, including planning, analysis, design, development, and maintenance.
(CO-2) Demonstrate an understanding of object-oriented programming by using structs and classes in software projects.
(CO-3)Use object-oriented programming techniques to develop executable programs that include elements such as inheritance and polymorphism.
(CO-4) Document and format code in a consistent manner.
(CO-5) Apply basic searching and sorting algorithms in software design.
(CO-6) Apply single- and multi-dimensional arrays in software.
(CO-7) Use a symbolic debugger to find and fix runtime and logical errors in software.
(CO-8) Describe the phases of program translation from source code to executable code.
Additional Instructor Objectives
(CO-9) Develop well-documented programs using best practices
(CO-10) Create classes incorporating object-oriented techniques
(CO-11) Use data abstraction, polymorphism, inheritance, and interfaces.
(CO-12) Apply Object Design Patterns