C# Object Oriented Programming Concepts

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
Advertisements

OOP Abstraction Classes Class Members: Properties & Methods Instance (object) Encapsulation Interfaces Inheritance Composition Polymorphism Using Inheritance.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
BITS Pilani Avinash Gautam Department of Computer Science and Information Systems.
Overview1 History of Programming Languages n Machine languages n Assembly languages n High-level languages – Procedure-oriented – Object-oriented/Event-driven.
OBJECT-ORIENTED PROGRAMMING. What is an “object”? Abstract entity that contains data and actions Attributes (characteristics) and methods (functions)
Object-Oriented PHP (1)
Object-oriented Programming Concepts
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
CO320 Introduction to Object- Oriented Programming Michael Kölling 3.0.
2.5 OOP Principles Part 1 academy.zariba.com 1. Lecture Content 1.Fundamental Principles of OOP 2.Inheritance 3.Abstraction 4.Encapsulation 2.
What is Object-Oriented Programming?. Objects – Variables and Logic inside "Objects", not standalone code – Objects contain related variables and functions.
Using Jeroo To Teach Object-Oriented Concepts By Christian Digout.
Introduction to ASP.NET MIS 324 Professor Sandvig.
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
Introduction to Object-oriented programming and software development Lecture 1.
An Object-Oriented Approach to Programming Logic and Design
Object Oriented Programming CS160 - OOP. Objects Objects are a Objects are a way to organize and conceptualize a program as a set of interacting objects.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
School of Computer Science & Information Technology G6DICP - Lecture 17 GUI (Graphical User Interface) Programming.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
08 Encapsulation and Abstraction. 2 Contents Defining Abstraction Levels of Abstraction Class as Abstraction Defining a Java Class Instantiating a Class.
Java Fundamentals Usman Ependi UBD
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
“everything is an object”. Class Template Code for defining an object Objects are created with NEW keyword (method) Namespace – (disambiguation) Context.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
CSCE 240 – Intro to Software Engineering Lecture 3.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Object Programming Barry Sosinsky Valda Hilley Programming the Web Chapter.
Software Construction Lab 05 Abstraction, Inheritance, and Polymorphism in Java.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Inheritance Class Hierarchies SoftUni Team Technical Trainers Software University
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Introduction to Object-oriented Programming
MIS Professor Sandvig MIS 324 Professor Sandvig
CSC 222: Computer Programming II
Object Oriented Programming
Object-Oriented Programming Concepts
C# Object Oriented Programming Concepts
The Movement To Objects
CHAPTER 5 GENERAL OOP CONCEPTS.
Classes and OOP.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object Oriented Concepts
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object Oriented Analysis and Design
Lecture 13 Writing Classes Richard Gesick.
Layout and Partial Views
Object-oriented Design in Processing
Object-Oriented Programming
OBJECT-ORIENTED PROGRAMMING
Object-Oriented Programming
Object-oriented Design in Processing
Objects First with Java A Practical Introduction using BlueJ
Interfaces, Classes & Objects
Layout and Partial Views
Object-Oriented Programming
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
Object-oriented Design in Processing
Chapter 10 Thinking in Objects Part 1
Object Oriented Design & Analysis
Object-oriented Design in Processing
Object Oriented Programming(OOP)
Presentation transcript:

C# Object Oriented Programming Concepts MIS 324 -- Professor Sandvig 11/19/2018 C# Object Oriented Programming Concepts MIS 324 Professor Sandvig

MIS 324 -- Professor Sandvig 11/19/2018 Overview OOP Benefits Terminology Creating classes Instantiating objects Constructors Dice Roll example Dog Example Summary

MIS 324 -- Professor Sandvig 11/19/2018 OOP Benefits Hide program complexity simple public interface hides complexity inside Support reusability Create modularity Reusability

OOP Benefits Legos analogy: Modular Reusable Simple interface Each piece has single purpose Reusable Pieces can be used in multiple products Simple interface Maintainable

Terminology Encapsulation Fundamental principle of OOP Code wrapped inside classes Hide implementation details Reduce complexity Provide simple interface

Abstraction Interface exposing essential features Implementation details hidden Example: Math.Pow(number, power)

MIS 324 -- Professor Sandvig 11/19/2018 Class Typically represents real-world object Person Product Shopping Cart Etc. Properties Attributes Methods actions

Object Object Instance of a class Has functionality of class

MIS 324 -- Professor Sandvig 11/19/2018 Instantiation Source: asp.netPRO

MIS 324 -- Professor Sandvig 11/19/2018 Objects Objects have properties & methods of class

MIS 324 -- Professor Sandvig 11/19/2018 Constructors Constructors set object properties during initialization Examples: Dog myDog = new Dog(“Apollo”, “male”, 28);

Defining a Class in C# See “Classes in C#” handout Random die rolls: /dice/diceRoller

MIS 324 -- Professor Sandvig 11/19/2018 Static Classes Don’t need to instantiate Typically utility-type classes Examples: Convert.ToString(33.3); DateTime.Now.ToLongDateString();

MIS 324 -- Professor Sandvig 11/19/2018 Inheritance Objects can inherit from other objects Goal: never program anything twice Beyond scope of this course

.NET Class Library Contains thousands of class Example Data access Data collections Drawing (graphics) Web services Etc. Example SqlCommand Class

MIS 324 -- Professor Sandvig 11/19/2018 Summary Covered major OOP concepts/terminology Goals: Hide program complexity Support reusability Create modularity Concepts & terminology is universal