OOP Course - Virtual Trip

Slides:



Advertisements
Similar presentations
Design Patterns: Structural Design Patterns General and reusable solutions to common problems in software design Software University
Advertisements

ORM Basics Repository Pattern, Models, Entity Manager Ivan Yonkov Technical Trainer Software University
Inheritance Class Hierarchies SoftUni Team Technical Trainers Software University
Static Members Static Variables & Methods SoftUni Team Technical Trainers Software University
Stacks and Queues Processing Sequences of Elements SoftUni Team Technical Trainers Software University
Generics SoftUni Team Technical Trainers Software University
Version Control Systems
Helpers, Data Validation
Auto Mapping Objects SoftUni Team Database Applications
Introduction to Entity framework
Databases basics Course Introduction SoftUni Team Databases basics
Abstract Classes, Abstract Methods, Override Methods
C# Basic Syntax, Visual Studio, Console Input / Output
Interface Segregation / Dependency Inversion
OCP and Liskov Principles
C# Basic Syntax, Visual Studio, Console Input / Output
Introduction to MVC SoftUni Team Introduction to MVC
Deploying Web Application
PHP MVC Frameworks Course Introduction SoftUni Team Technical Trainers
PHP Fundamentals Course Introduction SoftUni Team Technical Trainers
Reflection SoftUni Team Technical Trainers Java OOP Advanced
Introduction to Entity Framework
Application Architecture, Redux
ASP.NET Integration Testing
ASP.NET Unit Testing Unit Testing Web API SoftUni Team ASP.NET
Classes, Properties, Constructors, Objects, Namespaces
Mocking tools for easier unit testing
State Management Cookies, Sessions SoftUni Team State Management
EF Code First (Advanced)
PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers
Entity Framework: Code First
Inheritance Class Hierarchies SoftUni Team Technical Trainers C# OOP
Java OOP Overview Classes and Objects, Members and Class Definition, Access Modifier, Encapsulation Java OOP Overview SoftUni Team Technical Trainers.
Entity Framework DB From Code, OOP Introduction
Databases advanced Course Introduction SoftUni Team Databases advanced
C#/Java Web Development Basics
Abstraction, Interface, Inheritance, Polymorphism, Override / Overload
Balancing Binary Search Trees, Rotations
Entity Framework: Relations
Array and List Algorithms
Functional Programming
The Right Way Control Flow
ASP.NET Razor Engine SoftUni Team ASP.NET MVC Introduction
Processing Variable-Length Sequences of Elements
Transactions in Entity Framework
Databases Advanced Course Introduction SoftUni Team Databases Advanced
Best practices and architecture
Testing with Spring Boot
Multidimensional Arrays, Sets, Dictionaries
Extending functionality using Collections
Exporting and Importing Data
ASP.NET Filters SoftUni Team ASP.NET MVC Introduction
Making big SPA applications
Manual Mapping and AutoMapper Library
Functional Programming
C# Advanced Course Introduction SoftUni Team C# Technical Trainers
Course Overview, Trainers, Evaluation
Exporting and Importing Data
JavaScript Fundamentals
Introduction to TypeScript & Angular
CSS Transitions and Animations
Train the Trainers Course
Spring Data Advanced Querying
Inheritance and Prototypes
Directives & Forms Capturing User Input SoftUni Team
Version Control Systems
Polymorphism, Interfaces, Abstract Classes
CSS Transitions and Animations
Iterators and Generators
What is Encapsulation, Benefits, Implementation in Java
Presentation transcript:

OOP Course - Virtual Trip First View to OOP course Java OOP SoftUni Team Ventsislav Ivanov Software University http://softuni.bg

Table of Contents What are Objects? What is OOP? Cohesion and Coupling Exam Overview

Have a Question? sli.do #Java-OOP

Real-Life Objects in Programming What are Objects? Real-Life Objects in Programming

What are Objects? class Person { Double height; String skinColor; List<Clothes> clothes; } class Person { Integer age; String hairColor; List<Clothes> clothes; }

Initialization of Object Person ventsi = new Person() Person ventsi = new Person(1.85, "White", clotes) Person ventsi = new Person(27, "Brown", clotes)

Object Oriented Programming What is OOP? Object Oriented Programming

OBJECT What is OOP? Property Methods Object-Oriented Programming Property field or attribute OBJECT Methods DoSomething() Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as properties; and code, in the form of procedures, often known as methods.

Four Pillars of OOP

Encapsulation Variables of a class will be hidden from other classes Accessed only through the methods of their current class public class Person { Integer age; Integer getAge() { return this.age; } void setAge(int age) { this.age = age; private public public private

Inheritance Process where one class acquires the properties of another Information is made manageable in a hierarchical order public class Mammal { public Point move(Point x, Point y) } public class Person extends Mammal { public void speak (String words) } public class Cat extends Mammal { public void myau() }

Polymorphism Person IS-A Person Person IS-A Animal Person IS-A Mammal Ability of an object to take on many forms Parent class reference is used to refer to a child class object public interface Animal {} public class Mammal {} public class Person extends Mammal implements Animal {} Person IS-A Person Person IS-A Animal Person IS-A Mammal Person IS-A Object

Abstraction Focus on necessary context for user public abstract class Mammal { public Point move(Point x, Point y) TODO: Add moving logic } public class Person extends Mammal { } Mammal cat = new Mammal(); // can't be instantiated Mammal ventsi = new Person(); ventsi.move();

Strong Cohesion and Loose Coupling key value Cohesion and Coupling Strong Cohesion and Loose Coupling

Cohesion Strong Cohesion Low Cohesion Measures the strength of relationship between pieces of functionality within a given module / class Strong Cohesion Low Cohesion Staff Double salary; DateTime payday; setSalary(newSalary) getSalary() paySalary() Staff checkMail(); sendMail(); emailValidate(); printMail(); saveMailInDB();

Coupling Temporal coupling How related are two modules / classes Subclass Coupling The child is connected to its parent, but the parent is not connected to the child. Temporal coupling When two actions are bundled together into one module just because they happen to occur at the same time.

Exam Overview Live Demo on Next Exam

The Map Class in JS Extract input data for each family Build a OOP structure of city with many houses and people Build a proper structure for houses Organize all items in houses Make economy of all houses Send salary and pay bills for every houses Build logic how families go away from city

Objects and Associative Arrays https://softuni.bg/courses/javascript-fundamentals © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

License This course (slides, examples, demos, videos, homework, etc.) is licensed under the "Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International" license © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

Free Trainings @ Software University Software University Foundation – softuni.org Software University – High-Quality Education, Profession and Job for Software Developers softuni.bg Software University @ Facebook facebook.com/SoftwareUniversity Software University @ YouTube youtube.com/SoftwareUniversity Software University Forums – forum.softuni.bg © Software University Foundation – http://softuni.org This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.