C# Object Oriented Programming Concepts

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

OBJECT-ORIENTED PROGRAMMING CONCEPTS (Review). What is an Object? What is an Object? Objects have states and behaviors. Example: A dog has states - color,
Object-Oriented PHP (1)
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
ASP.NET Programming with C# and SQL Server First Edition
Chapter 13: Object-Oriented Programming
Business Object Payne Ch. 15 MIS 424 MIS 424 Professor Sandvig Professor Sandvig.
IS437: Fall 2004 Instructor: Dr. Boris Jukic Object Oriented Programming.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
PHP Workshop ‹#› PHP Classes and Object Orientation.
Object Oriented Programming
Lecture 5 What is object-oriented programming OOP techniques How Windows Forms applications rely on OOP.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to ASP.NET MIS 324 Professor Sandvig.
An Object-Oriented Approach to Programming Logic and Design
JavaScript, Fourth Edition
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
ClassesPHPMay-2007 : [‹#›] PHP Classes and Object Orientation.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 24P. 1Winter Quarter C++ Lecture 24.
2010/11 : [1]Building Web Applications using MySQL and PHP (W1)OO PHP PHP Classes and Object Orientation.
Design Patterns. OO-Concepts Don’t rewrite code Encapsulation Inheritance Write flexible code.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Java Fundamentals Usman Ependi UBD
MIS 324 Professor Sandvig. Overview  Review ASP.NET  Preview: MIS 424  Final exam info.
12 OBJECT-ORIENTED DESIGN CHAPTER
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
“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.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
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.
The Object-Oriented Thought Process Chapter 03
Introduction to Object-oriented Programming
MIS Professor Sandvig MIS 324 Professor Sandvig
Object Oriented Programming
Object-Oriented Programming Concepts
The Basics of OOP Design
The Movement To Objects
Classes and OOP.
Overview of Data Access
Object Oriented Programming in Java
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Overview of Data Access
Objects First with Java A Practical Introduction using BlueJ
MIS Professor Sandvig MIS 324 Professor Sandvig
Layout and Partial Views
C# Object Oriented Programming Concepts
PHP Classes and Object Orientation
Object-oriented Design in Processing
Lecture 22 Inheritance Richard Gesick.
Object-Oriented Programming
MIS Professor Sandvig MIS 324 Professor Sandvig
OBJECT-ORIENTED PROGRAMMING
Object-Oriented Programming
Tonga Institute of Higher Education
Objects First with Java A Practical Introduction using BlueJ
MIS Professor Sandvig MIS 324 Professor Sandvig
Interfaces, Classes & Objects
Layout and Partial Views
Object-Oriented Programming
Objects First with Java A Practical Introduction using BlueJ
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Introducing Java.
Object-oriented Design in Processing
Object-Oriented PHP (1)
Object-oriented Design in Processing
Object Oriented Programming(OOP)
MIS Professor Sandvig MIS 324 Professor Sandvig
Presentation transcript:

C# Object Oriented Programming Concepts MIS 324 -- Professor Sandvig 5/15/2018 C# Object Oriented Programming Concepts MIS 324 Professor Sandvig

MIS 324 -- Professor Sandvig 5/15/2018 Overview OOP Benefits Terminology Creating classes Instantiating objects Constructors Dog Example Summary

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

MIS 324 -- Professor Sandvig 5/15/2018 Terminology Class Code wrapper Exposes an interface Properties (attributes) Methods Everything in .NET is a class

Terminology Object Instantiating an object Instance of a class Provides class functionality Each object has a name Destroyed when program ends Instantiating an object CarClass carObject = new CarClass();

ASP.NET Classes & Objects MIS 324 -- Professor Sandvig 5/15/2018 ASP.NET Classes & Objects NET Class library has thousands of built-in classes Organized into NameSpaces Class Library Create custom classes Reusable across multiple pages & applications

MIS 324 -- Professor Sandvig 5/15/2018 Classes Classes are central feature of OOP Use to represent real-world objects Customers Products Web Controls Textbox button

MIS 324 -- Professor Sandvig 5/15/2018 Instantiation Source: asp.netPRO

MIS 324 -- Professor Sandvig 5/15/2018 Objects Objects have properties & methods of class

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

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

MIS 324 -- Professor Sandvig 5/15/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 5/15/2018 Creating Classes Classes often represent real-world objects Product, student, faculty, shopping cart “Business objects” Example: Shopping Cart Properties: Item ISBNs, titles, count Methods: add ISBN, remove ISBN, calculate total, move to Wish List, …

MIS 324 -- Professor Sandvig 5/15/2018 Creating New Classes Where: MVC Model folder MVC ViewModel folder MVC DataRepository folder Example: Dog class might be used in following applications: Dog show management software Dog kennel software Veterinarian office Usage: Dog

MIS 324 -- Professor Sandvig 5/15/2018 Creating New Classes Properties & methods

MIS 324 -- Professor Sandvig 5/15/2018 Creating New Classes Constructors Set properties when instantiating object

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