Classes and Objects. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
|
|
- Millicent Wade
- 5 years ago
- Views:
Transcription
1 Classes and Objects Andrew Cumming, SoC Introduction to.net Bill Buchanan, SoC W.Buchanan (1)
2 Course Outline Introduction to.net Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components. C#. Introduction to Visual Studio Environment. Day 1: Afternoon Variables and Types, Naming Variables, Using Built-In Data Types, Visual Studio Environment: Design Surface - dynamic help; Toolbox; Code Page; Properties Window; Solution Explorer. Day 2: Morning Converting Data Types, Control structures: if, for, while, foreach, switch. Day 2: Afternoon File handling looking up details from help, Methods, Parameter passing, Variables and scope. Day 3: Morning REVIEW OF BASICS FROM DAY 2, Converting Data Types, Control structures: if, for, while, foreach, switch. Day 3: Afternoon Brief description of Arrays, Type Casts, Overview of System.Collections, ArrayLists and HashTables, Sorting, Enumerators Course Outline (Day 1 to 3) W.Buchanan (2)
3 Course Outline Introduction to.net Day 4: Morning Using Reference-Type Variables, Using Common Reference Types, The Object Hierarchy, Namespaces in the.net Framework, Debugging techniques, breakpoints, line stepping, call stack, locals window. Day 4: Afternoon - Classes and Objects, Using Encapsulation, C# and Object Orientation, Defining Object-Oriented Systems, Deriving es, Implementing es, Private,, internal and protected, Using Interfaces, Abstract es, Using Constructors Initializing Data, Objects and Memory, Resource Management, Object Browser, Class View. Day 5: Morning - Methods and overloaded methods, Exceptions, Intellisense and overloaded methods, Enumerations and enumeration conversion. Day 5: Afternoon: Using Modules and Assemblies, XML (read only), Serialising es. Course Outline (Day 4 and 5) W.Buchanan (3)
4 Module 8 Introduction to.net Classes and objects. Using encapsulation. Defining Object-Oriented Systems. Inheritance. Sealed es. Overriding es. Introduction W.Buchanan (4)
5 An Introduction to Object- Orientation Bill Buchanan Introduction W.Buchanan (5)
6 Some Cups W.Buchanan (6)
7 Parameter Cup 1 Cup 2 Cup3 Shape (Standard/Square/Mug) Standard Square Mug Colour (Red/Blue/Green) Blue Red Green Size (Small/Medium/Large) Small Large Small Transparency (0 to 100%) 100% 50% 25% Handle type (Small/Large) Small Small Large Introduction to.net In object-orientation:a collection of parameters defines a. Class for the cup is thus: Shape, Colour, Size, Transparency, HandleType. In object-orientation: Objects are created from es. A Quick Introduction to Object-Orientation W.Buchanan (7)
8 using System; namespace ConsoleApplication2 Class definitions Cup Shape; Colour; Size; int Transparency; Handle; Available variables (properties) Method DisplayCup() System.Console.WriteLine("Cup is 0, 1", Colour, Handle); Introduction to.net Class1 static Main([] args) Cup cup new Cup(); cup.colour "Red"; cup.handle "Small"; cup.displaycup(); System.Console.ReadLine(); Create new object Set properties Apply method Example C# Program using Object-Orientation W.Buchanan (8)
9 using System; namespace ConsoleApplication2 Circuit double Parallel(double r1, double r2) return((r1*r2)/(r1+r2)); double Series(double r1, double r2) return(r1+r2); Class definitions Introduction to.net Class1 static Main([] args) double v1100,v2100; double res; Circuit cir new Circuit(); rescir.parallel(v1,v2); System.Console.WriteLine("Parallel resistance is 0 ohms",res); rescir.series(100,100); System.Console.WriteLine("Series resistance is 0 ohms",res); System.Console.ReadLine(); Another example W.Buchanan (9)
10 using System; namespace ConsoleApplication2 Complex double real; double imag; double mag() return (Math.Sqrt(real*real+imag*imag)); double angle() return (Math.Atan(imag/real)*180/Math.PI); Class1 static Main([] args) str; double mag,angle; Complex r new Complex(); System.Console.Write("Enter real value >>"); strsystem.console.readline(); r.real Convert.ToInt32(str); System.Console.Write("Enter imag value >>"); strsystem.console.readline(); r.imag Convert.ToInt32(str); magr.mag(); angler.angle(); System.Console.WriteLine("Mag is 0 and angle is 1",mag,angle); System.Console.ReadLine(); z x + jy z z x 2 tan + y 1 2 y x Another example W.Buchanan (10)
11 Object Properties Bill Buchanan Introduction W.Buchanan (11)
12 Make. This could be Ford, Vauxhall, Nissan or Toyota. Type. This could be Vectra, Astra, or Mondeo. Colour. This could be colours such as Red, Green or Blue. Country of Manufacture. This could be countries such as UK, Germany or France. Car properties W.Buchanan (12)
13 using using System; System; namespace sample01 namespace sample01 Car Car colour; colour; type; type; make; make; country; country; double double cost; cost; Colour Colour get get return return colour; colour; set set colourvalue; colourvalue; Type Type get get return return type; type; set set typevalue; typevalue; Country Country get get return return country; country; set set countryvalue; countryvalue; Make Make get get return return make; make; set set makevalue; makevalue; double double Cost Cost get get return return cost; cost; set set costvalue; costvalue; Relationship Tree Class1 static Main([] args) Car car1 new Car(); car1.colour"red"; car1.make"ford"; car1.type"mondeo"; car1.colour"uk"; car1.cost15000; Console.WriteLine( "Car is a " + car1.make + " " + car1.type); Console.ReadLine(); W.Buchanan (13)
14 double Cost get return cost; Read-only Introduction to.net Read/write double Cost set valvalue; double Cost set valvalue; get return cost; Write-only Read-only, write-only and read/write properties W.Buchanan (14)
15 Object-Orientation Bill Buchanan Introduction W.Buchanan (15)
16 Let s Look At Real Objects W.Buchanan (16)
17 Plants Plants Animals Minerals Introduction to.net Skin with fur/hair. Red blooded. Warm blooded. Backbone Vertebrates Mammals Invertebrates Birds Birds Classification W.Buchanan (17)
18 Collection Vertebrates Mammals Increasing generalisation Cats Cats Dogs Dogs Horses Horses Introduction to.net Lion Lion Tiger Tiger Relationship Tree Domestic Domestic Shared behaviours and characteristics Increasing specialisation W.Buchanan (18)
19 containers System Increasing generalisation Windows IO IO Drawing Introduction to.net Component Component Model Model Design Design Forms Forms Label Label Combo Combo Box Box Button Button Form Form Class Increasing specialisation Relationship Tree W.Buchanan (19)
20 using using System.Collections; System.Collections; using System.Windows.Forms; using System.Windows.Forms; Derived using using System.Data; System.Data; namespace namespace WindowsApplication3 WindowsApplication3 Form1 Form1 : : System.Windows.Forms.Form Base System.Windows.Forms.Form containers System.Windows.Forms.Button System.Windows.Forms.Button button1; button1; System.Windows.Forms.TextBox System.Windows.Forms.TextBox textbox1; textbox1; Form1() Form1() System InitializeComponent(); InitializeComponent(); InitializeComponent() InitializeComponent() this.button1 this.button1 new new System.Windows.Forms.Button(); System.Windows.Forms.Button(); this.textbox1 this.textbox1 new new System.Windows.Forms.TextBox(); System.Windows.Forms.TextBox(); this.button1.location this.button1.location new new System.Drawing.Point(152, System.Drawing.Point(152, 192); 192); this.button1.name this.button1.name "button1"; "button1"; this.button1.tabindex this.button1.tabindex 0; 0; this.button1.text this.button1.text "button1"; "button1"; this.textbox1.location this.textbox1.location new new System.Drawing.Point(80, System.Drawing.Point(80, 64); 64); this.textbox1.name this.textbox1.name "textbox1"; "textbox1"; this.textbox1.text this.textbox1.text "textbox1"; "textbox1"; Component this.controls.add(this.textbox1); Component this.controls.add(this.textbox1); Forms Model this.controls.add(this.button1); Forms Model this.controls.add(this.button1); this.name this.name "Form1"; "Form1"; this.text this.text "Form1"; "Form1"; Design this.load Design this.load + + new new System.EventHandler(this.Form1_Load); System.EventHandler(this.Form1_Load); this.resumelayout(false); this.resumelayout(false); static Combo static Main() Main() Combo Label Box Application.Run(new Label Box Application.Run(new Form1()); Form1()); Relationship Form1_Load(object Tree Form1_Load(object sender, sender, System.EventArgs System.EventArgs e) e) W.Buchanan (20) this means Windows this object (which is Form1)
21 Inheritance Bill Buchanan Introduction W.Buchanan (21)
22 Inheritance Derives characteristics and behaviours from those above us. Inheritance W.Buchanan (22)
23 using using System; System; namespace ConsoleApplication1 namespace ConsoleApplication1 name; name; containers Name Name get get return return name; name; set set namevalue; namevalue; System ToLowerCase() ToLowerCase() namename.tolower(); namename.tolower(); : : // // Inherit Inherit from from Display() Display() Windows Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); Test Test Component static Component static Main() Main() Forms Model Forms Model p1 p1 new new (); (); p1.name"fred"; p1.name"fred"; Design p1.tolowercase(); Design p1.tolowercase(); p1.display(); p1.display(); System.Console.ReadLine(); System.Console.ReadLine(); Combo Combo Label Box Label Box Inheritance Inherent from Method derived from Name: fred W.Buchanan (23)
24 using using System; System; namespace ConsoleApplication1 namespace ConsoleApplication1 name; name; containers Name Name get get return return name; name; set set namevalue; namevalue; System ToLowerCase() ToLowerCase() namename.tolower(); namename.tolower(); : : // // Inherit Inherit from from Display() Display() Windows Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); Test Test Component static Component static Main() Main() Forms Model Forms Model p1 p1 new new (); (); p2 p2 new new (); (); Design p1.name"fred"; Design p1.name"fred"; p2.name"bert"; p2.name"bert"; p1.tolowercase(); p1.tolowercase(); p1.display(); Combo p1.display(); Combo p2.display(); p2.display(); Label Box System.Console.ReadLine(); Label Box System.Console.ReadLine(); Inheritance Inherent from Name: fred Name: Bert W.Buchanan (24)
25 using using System; System; namespace ConsoleApplication1 namespace ConsoleApplication1 sealed sealed name; name; containers Name Name get get return return name; name; set set namevalue; namevalue; System ToLowerCase() ToLowerCase() namename.tolower(); namename.tolower(); : : // // Inherit Inherit from from Display() Display() Windows Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); Test Test Component static Component static Main() Main() Forms Model Forms Model p1 p1 new new (); (); p1.name"fred"; p1.name"fred"; Design p1.tolowercase(); Design p1.tolowercase(); p1.display(); p1.display(); System.Console.ReadLine(); System.Console.ReadLine(); Combo Combo Label Box Label Box Sealed Classes Inherent from 'ConsoleApplication1.' : cannot inherit from sealed 'ConsoleApplication1.' W.Buchanan (25)
26 Overriding Classes Bill Buchanan Introduction W.Buchanan (26)
27 using using System; System; namespace namespace ConsoleApplication1 ConsoleApplication1 Test Test static static Main() Main() name; name; p1 p1 new new (); (); Name Name p1.name"fred"; p1.name"fred"; get get return return name; name; set set namevalue; p1.tolowercase(); namevalue; p1.tolowercase(); p1.display(); p1.display(); virtual virtual ToLowerCase() ToLowerCase() System.Console.ReadLine(); System.Console.ReadLine(); namename.tolower(); namename.tolower(); : : // // Inherit Inherit from from Display() Display() Method has been overwritten Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); Name: Fred override override ToLowerCase() ToLowerCase() Console.WriteLine("Method Console.WriteLine("Method has has been been overwritten"); overwritten"); W.Buchanan (27) Overriding es
28 Object Equals(). Determines if two objects are the same. Finalize(). Cleans up the object (the destructor). GetHashCode(). Allows an object to define its hash code. GetType(). Determine the type of an object. MemberwiseClone(). Create a copy of the object. ReferenceEquals(). Determines whether two objects are of the same instance. ToString(). Convert an object to a. Methods for the default object W.Buchanan (28)
29 using using System; System; namespace namespace ConsoleApplication1 ConsoleApplication1 Test Test static static Main() Main() name; name; Name Name p1 p1 new new (); (); p1.name"fred"; p1.name"fred"; get get return return name; name; strp1.tostring(); strp1.tostring(); set set namevalue; Console.WriteLine(str); namevalue; Console.WriteLine(str); System.Console.ReadLine(); System.Console.ReadLine(); virtual virtual ToLowerCase() ToLowerCase() namename.tolower(); namename.tolower(); : : // // Inherit Inherit from from Display() Display() Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); override override ToString() ToString() return("cannot return("cannot implement implement this this method"); method"); W.Buchanan (29)
30 Abstract Classes Bill Buchanan Introduction W.Buchanan (30)
31 Here Here is is the the new new object, object, but but you you can t can t use use it it unless unless you you implement your your own own OpenTheBox() method! Okay. Okay. It s It s worth worth it. it. I ll I ll do do that. that. Abstract Classes W.Buchanan (31)
32 An example W.Buchanan (32)
33 using using System; System; namespace namespace ConsoleApplication1 ConsoleApplication1 abstract abstract name; name; Name Name get get return return name; name; set set namevalue; namevalue; ToLowerCase() ToLowerCase() namename.tolower(); namename.tolower(); abstract abstract DisplayLower(); DisplayLower(); : : // // Inherit Inherit from from Display() Display() Console.WriteLine("Name: Console.WriteLine("Name: "+Name); "+Name); Test Test static static Main() Main() p1 p1 new new (); (); p1.name"fred"; p1.name"fred"; p1.tolowercase(); p1.tolowercase(); p1.display(); p1.display(); p1.displaylower(); p1.displaylower(); System.Console.ReadLine(); System.Console.ReadLine(); 'ConsoleApplication1.' does not implement inherited abstract member 'ConsoleApplication1..DisplayLower()' Abstract Classes W.Buchanan (33)
34 using System; namespace ConsoleApplication1 abstract name; Name get return name; set namevalue; ToLowerCase() namename.tolower(); abstract DisplayLower(); : // Inherit from Display() Console.WriteLine("Name: "+Name); override DisplayLower() Console.WriteLine("Name: "+Name.ToUpper()); Abstract Classes Test Test static static Main() Main() p1 p1 new new (); (); p1.name"fred"; p1.name"fred"; p1.tolowercase(); p1.tolowercase(); p1.display(); p1.display(); p1.displaylower(); p1.displaylower(); System.Console.ReadLine(); System.Console.ReadLine(); Name: fred Name: FRED W.Buchanan (34)
35 Interfaces Bill Buchanan Introduction W.Buchanan (35)
36 Here Here is is the the new new object, object, but but you you must must implement it it in in every every way way that that I I have have defined! Pweh! Pweh! You re You re rather rather strict. strict. Interfaces W.Buchanan (36)
37 r 1 r 2 R T R 1 + R 2 r 1 Introduction to.net Circuit r 2 R 1 R T R1 + R 2 R 2 Circuit Object W.Buchanan (37)
38 r 1 r 2 R T R 1 + R 2 r 1 Introduction to.net r 2 interface NewCircuit double r1 r1 set; set; get; get; double r2 r2 set; set; get; get; double calcparallel(); double calcseries(); R 1 R T R1 + R 2 R 2 Interface Definition W.Buchanan (38)
39 r 1 r 2 Circuit: NewCircuit double res1, res2; double r1 r 1 set res1value; get return res1; double r2 r 2 set res2value; get return res2; double calcparallel() return((r1*r2)/(r1+r2)); double calcseries() return(r1+r2); Derived Class Definition R T R 1 + R 2 R 1 R T R1 + R 2 R interface NewCircuit double r1 r1 set; set; get; get; double r2 r2 set; set; get; get; double calcparallel(); double calcseries(); 2 W.Buchanan (39)
40 r 1 r 2 Circuit: NewCircuit double res1, res2; double r1 set res1value; get return res1; double r2 set res2value; get return res2; double calcparallel() return((r1*r2)/(r1+r2)); double calcseries() return(r1+r2); Derived Class Definition r 1 r 2 R T R 1 + R 2 R Class1 1 R T static Main() R1 + R 2 R Circuit cir new Circuit(); cir.r11000; cir.r21000; double res cir.calcparallel(); System.Console.WriteLine( "Parallel Resistance is " + res); System.Console.ReadLine(); 2 W.Buchanan (40)
41 IOCollection. Defines size, enumerators and synchronization methods for all collections. The properties are: Count, IsSynchronized and SyncRoot, and a method of CopyTo(). IComparer. Compares two objects. The associated method is Compare(). IEnumerator. Supports iteration over a collection. The properties are Current, and the methods are MoveNext() and Reset(). Introduction to.net IList. Represents a collection of objects that are accessed by an index. The properties are IsFixedSize, IsReadOnly, Item, and the methods are: Add(), Clear(), Contains(), IndexOf(), Insert(), Remove() and RemoveAt(). W.Buchanan (41)
42 W.Buchanan (42)
43 The IOCollection defines: The es which implement IOCollection include: Array. ArrayList. Hastable. Thus an array will have the following properties: Introduction to.net Count. IsSynchronized. SyncRoot W.Buchanan (43)
44 W.Buchanan (44)
45 Constructors Bill Buchanan Introduction W.Buchanan (45)
46 A constructor is a method that is called whenever the object is first created. Introduction to.net A destructor is a method that is called whenever the object is destroyed. Constructors and destructors W.Buchanan (46)
47 code, name, telephone; // Constructor ( c) codec; Name set namevalue; get return name; Telephone set telephonevalue; get return telephone; Display() Console.WriteLine("Code: " + code + " Name: " + name + " Telephone: " + telephone); Console.ReadLine(); W.Buchanan (47)
48 code, name, telephone; // Constructor ( c) codec; Name set namevalue; get return name; Telephone set telephonevalue; pf1.telephone"123456"; pf1.display(); get return telephone; Display() Class1 static Main([] args) pf1new ("00000"); pf1.name"fred Smith"; Console.WriteLine("Code: " + code + " Name: " + name + " Telephone: " + telephone); Console.ReadLine(); W.Buchanan (48)
49 Static and Instance Members Bill Buchanan Introduction W.Buchanan (49)
50 A can either have static members of instance members. Instance members relate to the object created, while static members can be used by referring to the name of the method within the. For example the following are calls to static members: Convert.ToInteger("str"); Console.WriteLine("Hello"); Introduction to.net Whereas in the following, there are two instance methods (Read() and Write()), these operate on the created data type: System.IO.StreamReader nn new StreamReader(); nn.read(); nn.write(); Instance members thus operate on an instance of a. Static and instance members W.Buchanan (50)
51 using System;.. static int number0; code, name, telephone; // Constructor ( c) number++; codec; Class1 static Main([] args) pf1new ("00000"); pf1.name"fred Smith"; pf1.telephone"123456"; pf2new ("00001"); pf2.name"fred Cannon"; pf2.telephone"223456"; pf3new ("00002"); pf3.name"fred McDonald"; pf3.telephone"323456";.howmany(); static HowMany() Console.WriteLine("There are " + number + " profiles "); Console.ReadLine(); Using a static member to count the number of instances W.Buchanan (51)
Classes and Objects. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
Classes and Objects Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline 11-12am 12-1pm: 1-1:45pm 1:45-2pm:, Overview of.net Framework,.NET Components, C#. C# Language Elements Classes,
More information6: Arrays and Collections
6: Arrays and Collections Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More information6: Arrays and Collections
6: Arrays and Collections Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More informationIntroduction to.net. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components. C#. Day 1: Afternoon
More informationIntroduction to.net. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline 11-12am 12-1pm: 1-1:45pm 1:45-2pm:, Overview of.net Framework,.NET Components, C#. C# Language Elements Classes, Encapsulation, Object-Orientation,
More informationModule 5: Review of Day 3
Module 5: Review of Day 3 Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More informationModule 5: Review of Day 3
Module 5: Review of Day 3 Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components.
More information.NET XML Web Services
.NET XML Web Services Bill Buchanan Course Outline Day 1: Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components. C#. Introduction to Visual Studio Environment..
More informationIntroduction to.net. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline Day 1: Morning Introduction to Object-Orientation, Introduction to.net, Overview of.net Framework,.NET Components. C#. Day 1: Afternoon
More informationUser-Defined Controls
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationBlank Form. Industrial Programming. Discussion. First Form Code. Lecture 8: C# GUI Development
Blank Form Industrial Programming Lecture 8: C# GUI Development Industrial Programming 1 Industrial Programming 2 First Form Code using System; using System.Drawing; using System.Windows.Forms; public
More informationClasses in C# namespace classtest { public class myclass { public myclass() { } } }
Classes in C# A class is of similar function to our previously used Active X components. The difference between the two is the components are registered with windows and can be shared by different applications,
More information.NET. Details: Name: Course:.Net XML Web Services Introduction to.net Unit: 0 Instructors: Bill Buchanan/ Alistair Lawson. W.Buchanan/A.
Name: Course:.Net XML Web Services Title: Introduction to.net Unit: 0 Instructors: Bill Buchanan/ Alistair Lawson Details: Login details: Username: lincrea Password: plugtop07 Web page: http:www.dcs.napier.ac.uk/~bill/dotnet_web.htm
More information1. Windows Forms 2. Event-Handling Model 3. Basic Event Handling 4. Control Properties and Layout 5. Labels, TextBoxes and Buttons 6.
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationLISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];
1 LISTING PROGRAM using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace SortingApplication static class Program / / The main entry point for
More informationThis is the start of the server code
This is the start of the server code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Net; using System.Net.Sockets;
More informationListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationSub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.
Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:
More informationTutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic
Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic Outline 6.1 Test-Driving the Enhanced Inventory Application 6.2 Variables 6.3 Handling the TextChanged
More informationInheriting Windows Forms with Visual C#.NET
Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes
More informationTutorial 5 Completing the Inventory Application Introducing Programming
1 Tutorial 5 Completing the Inventory Application Introducing Programming Outline 5.1 Test-Driving the Inventory Application 5.2 Introduction to C# Code 5.3 Inserting an Event Handler 5.4 Performing a
More informationC# and.net (1) cont d
C# and.net (1) cont d Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck,
More informationComputing is about Data Processing (or "number crunching") Object Oriented Programming is about Cooperating Objects
Computing is about Data Processing (or "number crunching") Object Oriented Programming is about Cooperating Objects C# is fully object-oriented: Everything is an Object: Simple Types, User-Defined Types,
More informationDOT NET SYLLABUS FOR 6 MONTHS
DOT NET SYLLABUS FOR 6 MONTHS INTRODUCTION TO.NET Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.) CLR Architecture and Services The.Net Intermediate
More informationIn order to create your proxy classes, we have provided a WSDL file. This can be located at the following URL:
Send SMS via SOAP API Introduction You can seamlessly integrate your applications with aql's outbound SMS messaging service via SOAP using our SOAP API. Sending messages via the SOAP gateway WSDL file
More information2609 : Introduction to C# Programming with Microsoft.NET
2609 : Introduction to C# Programming with Microsoft.NET Introduction In this five-day instructor-led course, developers learn the fundamental skills that are required to design and develop object-oriented
More informationPS2 Random Walk Simulator
PS2 Random Walk Simulator Windows Forms Global data using Singletons ArrayList for storing objects Serialization to Files XML Timers Animation This is a fairly extensive Problem Set with several new concepts.
More informationTeacher Training Solutions
Teacher Training Solutions Practical 7 Exercise 1 Task 1 class Animal private String name; private String diet; private String location; private double weight; private int age; private String colour; Page
More informationM Introduction to C# Programming with Microsoft.NET - 5 Day Course
Module 1: Getting Started This module presents the concepts that are central to the Microsoft.NET Framework and platform, and the Microsoft Visual Studio.NET integrated development environment (IDE); describes
More informationC# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN
Contents Contents 5 About the Author 12 Introduction 13 Conventions used in this book 14 1 The Visual Studio C# Environment 15 1.1 Introduction 15 1.2 Obtaining the C# software 15 1.3 The Visual Studio
More informationCourse Hours
Programming the.net Framework 4.0/4.5 with C# 5.0 Course 70240 40 Hours Microsoft's.NET Framework presents developers with unprecedented opportunities. From 'geoscalable' web applications to desktop and
More informationCourse Syllabus C # Course Title. Who should attend? Course Description
Course Title C # Course Description C # is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the.net Framework.
More informationCHAPTER 3. Writing Windows C# Programs. Objects in C#
90 01 pp. 001-09 r5ah.ps 8/1/0 :5 PM Page 9 CHAPTER 3 Writing Windows C# Programs 5 9 Objects in C# The C# language has its roots in C++, Visual Basic, and Java. Both C# and VB.Net use the same libraries
More informationDeveloping Microsoft.NET Applications for Windows (Visual Basic.NET)
Developing Microsoft.NET Applications for Windows (Visual Basic.NET) Course Number: 2555 Length: 1 Day(s) Certification Exam This course will help you prepare for the following Microsoft Certified Professional
More informationCOPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio
Introduction XXV Part I: C# Fundamentals 1 Chapter 1: The.NET Framework 3 What s the.net Framework? 3 Common Language Runtime 3.NET Framework Class Library 4 Assemblies and the Microsoft Intermediate Language
More informationUka Tarsadia University MCA ( 3rd Semester)/M.Sc.(CA) (1st Semester) Course : / Visual Programming Question Bank
Unit 1 Introduction to.net Platform Q: 1 Answer in short. 1. Which three main components are available in.net framework? 2. List any two new features added in.net framework 4.0 which is not available in
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 7 : Collections Lecture Contents 2 Why collections? What is a collection? Non-generic collections: Array & ArrayList Stack HashTable
More informationINTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)
INTRODUCTION TO.NET Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.) CLR Architecture and Services The.Net Intermediate Language (IL) Just- In-
More informationObject-Oriented Programming
Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object
More informationALPHAPRIMETECH 112 New South Road, Hicksville, NY 11801
ALPHAPRIMETECH 112 New South Road, Hicksville, NY 11801 Course Curriculum COMPUTER SYSTEM ANALYST-.NET C# Introduction to.net Framework.NET Framework OverView CLR,CLS MSIL Assemblies NameSpaces.NET Languages
More informationPolymorphism. Polymorphism. CSC 330 Object Oriented Programming. What is Polymorphism? Why polymorphism? Class-Object to Base-Class.
Polymorphism CSC 0 Object Oriented Programming Polymorphism is considered to be a requirement of any true -oriented programming language (OOPL). Reminder: What are the other two essential elements in OOPL?
More informationDistributed Systems Recitation 1. Tamim Jabban
15-440 Distributed Systems Recitation 1 Tamim Jabban Office Hours Office 1004 Sunday, Tuesday: 9:30-11:59 AM Appointment: send an e-mail Open door policy Java: Object Oriented Programming A programming
More informationTutorial 19 - Microwave Oven Application Building Your Own Classes and Objects
1 Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline 19.1 Test-Driving the Microwave Oven Application 19.2 Designing the Microwave Oven Application 19.3 Adding a New
More informationObject-Oriented Programming in C# (VS 2015)
Object-Oriented Programming in C# (VS 2015) This thorough and comprehensive 5-day course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes
More informationLab - 1. Solution : 1. // Building a Simple Console Application. class HelloCsharp. static void Main() System.Console.WriteLine ("Hello from C#.
Lab - 1 Solution : 1 // Building a Simple Console Application class HelloCsharp static void Main() System.Console.WriteLine ("Hello from C#."); Solution: 2 & 3 // Building a WPF Application // Verifying
More informationLast Time. Arrays. Arrays. Jagged Arrays. foreach. We began looking at GUI Programming Completed talking about exception handling
Last Time We began looking at GUI Programming Completed talking about exception handling Arrays, Collections, Hash Tables, 9/22/05 CS360 Windows Programming 1 9/22/05 CS360 Windows Programming 2 Arrays
More informationObject-Oriented Programming in C# (VS 2012)
Object-Oriented Programming in C# (VS 2012) This thorough and comprehensive course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes the C#
More informationC# Programming Syllabus
C# Programming Syllabus Overview: Today C# is considered to be the most popular and modern Programming language. It belongs to "C" family and inherently has lots of things carried from C programming language.
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 8 : Collections Lecture Contents 2 Why collections? What is a collection? Non-generic collections: Array & ArrayList Stack HashTable
More informationLearning to Program in Visual Basic 2005 Table of Contents
Table of Contents INTRODUCTION...INTRO-1 Prerequisites...INTRO-2 Installing the Practice Files...INTRO-3 Software Requirements...INTRO-3 Installation...INTRO-3 Demonstration Applications...INTRO-3 About
More informationCSC 330 Object-Oriented Programming. Encapsulation
CSC 330 Object-Oriented Programming Encapsulation Implementing Data Encapsulation using Properties Use C# properties to provide access to data safely data members should be declared private, with public
More informationLISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()
A-1 LISTING PROGRAM Form Mainform /* * Created by SharpDevelop. * User: Roni Anggara * Date: 5/17/2016 * Time: 8:52 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using
More informationWriting Object Oriented Software with C#
Writing Object Oriented Software with C# C# and OOP C# is designed for the.net Framework The.NET Framework is Object Oriented In C# Your access to the OS is through objects You have the ability to create
More informationIntroduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#)
Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#) Course Number: 4994A Length: 3 Day(s) Certification Exam There are no exams associated with this
More informationIntroduction To C#.NET
Introduction To C#.NET Microsoft.Net was formerly known as Next Generation Windows Services(NGWS).It is a completely new platform for developing the next generation of windows/web applications. However
More informationLecture 4 Overview of Classes, Containers & Generics
Lecture 4 Overview of Classes, Containers & Generics What is a Programming Object? An object is an instance of a class. A class is a template for an object. Everything's an object!!! Statements such as
More informationIntroduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)
Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#) Course Number: 6367A Course Length: 3 Days Course Overview This three-day course will enable students to start designing
More information9 A Preview of.net 2.0
473 9 A Preview of.net 2.0 Microsoft.NET is an evolving system that is continuously improved and extended. In late 2003 Microsoft announced.net 2.0 (codename Whidbey) as a major new version of.net; a beta
More informationWeb Services in.net (2)
Web Services in.net (2) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationCHAPTER 1: INTRODUCTION TO THE IDE 3
INTRODUCTION xxvii PART I: IDE CHAPTER 1: INTRODUCTION TO THE IDE 3 Introducing the IDE 3 Different IDE Appearances 4 IDE Configurations 5 Projects and Solutions 6 Starting the IDE 6 Creating a Project
More informationAdvanced Object-Oriented Programming. 11 Features. C# Programming: From Problem Analysis to Program Design. 4th Edition
11 Features Advanced Object-Oriented Programming C# Programming: From Problem Analysis to Program Design C# Programming: From Problem Analysis to Program Design 1 4th Edition Chapter Objectives Learn the
More informationUNIT III APPLICATION DEVELOPMENT ON.NET
UNIT III APPLICATION DEVELOPMENT ON.NET Syllabus: Building Windows Applications, Accessing Data with ADO.NET. Creating Skeleton of the Application Select New->Project->Visual C# Projects->Windows Application
More informationDOT NET Syllabus (6 Months)
DOT NET Syllabus (6 Months) THE COMMON LANGUAGE RUNTIME (C.L.R.) CLR Architecture and Services The.Net Intermediate Language (IL) Just- In- Time Compilation and CLS Disassembling.Net Application to IL
More informationCS313D: ADVANCED PROGRAMMING LANGUAGE
CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 8 : Collections Lecture Contents 2 Why collections? What is a collection? Non-generic collections: Array & ArrayList Stack HashTable
More informationconsiders the key aspects of the.net Framework; provides an introduction to C#; gives some examples of some standalone programs written in C#.
A Taste of C# Barry Cornelius Computing Services, University of Oxford Date: 24th February 2002; first created: 11th March 2001 http://users.ox.ac.uk/~barry/papers/ mailto:barry.cornelius@oucs.ox.ac.uk
More informationProgramming using C# LECTURE 07. Inheritance IS-A and HAS-A Relationships Overloading and Overriding Polymorphism
Programming using C# LECTURE 07 Inheritance IS-A and HAS-A Relationships Overloading and Overriding Polymorphism What is Inheritance? A relationship between a more general class, called the base class
More informationIntroduction to Microsoft.NET Framework Programming using VS 2005 (C#)
Introduction to Microsoft.NET Framework Programming using VS 2005 (C#) Course Length: 5 Days Course Overview This instructor-led course teaches introductory-level developers who are not familiar with the
More informationContents. Illustrations. 1 Introduction to Computers, the Internet, the Web and C# 1
csphtp1toc.fm Page viii Friday, December 14, 2001 1:49 PM Illustrations Preface viii xix xxxviii 1 Introduction to Computers, the Internet, the Web and C# 1 1.1 Introduction 2 1.2 What Is a Computer? 3
More informationAvoiding KeyStrokes in Windows Applications using C#
Avoiding KeyStrokes in Windows Applications using C# In keeping with the bcrypt.exe example cited elsewhere on this site, we seek a method of avoiding using the keypad to enter pass words and/or phrases.
More informationVisual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime
Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services
More informationInheritance and Polymorphism
Object Oriented Programming Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. Al-Azhar University Website: eaymanelshenawy.wordpress.com Email : eaymanelshenawy@azhar.edu.eg
More informationDuhok Polytechnic University Amedi Technical Institute/ IT Dept. Halkawt Rajab Hussain
Duhok Polytechnic University Amedi Technical Institute/ IT Dept. By Halkawt Rajab Hussain 2016-04-02 Objects and classes: Basics of object and class in C#. Private and public members and protected. Static
More information2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a) and (b) D. stands for Graphic Use Interaction
1. Which language is not a true object-oriented programming language? A. VB 6 B. VB.NET C. JAVA D. C++ 2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a)
More informationFramework Fundamentals
Questions Framework Fundamentals 1. Which of the following are value types? (Choose all that apply.) A. Decimal B. String C. System.Drawing.Point D. Integer 2. Which is the correct declaration for a nullable
More informationDistributed Systems Recitation 1. Tamim Jabban
15-440 Distributed Systems Recitation 1 Tamim Jabban Office Hours Office 1004 Tuesday: 9:30-11:59 AM Thursday: 10:30-11:59 AM Appointment: send an e-mail Open door policy Java: Object Oriented Programming
More informationCSC330 Object Oriented Programming. Inheritance
CSC330 Object Oriented Programming Inheritance Software Engineering with Inheritance Can customize derived classes to meet needs by: Creating new member variables Creating new methods Override base-class
More informationRAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY OBJECT ORIENTED PROGRAMMING QUESTION BANK UNIT I 2 MARKS
RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY OBJECT ORIENTED PROGRAMMING YEAR/SEM:II & III UNIT I 1) Give the evolution diagram of OOPS concept. 2) Give some
More informationThis page intentionally left blank
This page intentionally left blank arting Out with Java: From Control Structures through Objects International Edition - PDF - PDF - PDF Cover Contents Preface Chapter 1 Introduction to Computers and Java
More informationUnit 1: Visual Basic.NET and the.net Framework
1 Chapter1: Visual Basic.NET and the.net Framework Unit 1: Visual Basic.NET and the.net Framework Contents Introduction to.net framework Features Common Language Runtime (CLR) Framework Class Library(FCL)
More informationMastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500
Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500 Summary Each day there will be a combination of presentations, code walk-throughs, and handson projects. The final project
More informationChapter 02 Building Multitier Programs with Classes
Chapter 02 Building Multitier Programs with Classes Student: 1. 5. A method in a derived class overrides a method in the base class with the same name. 2. 11. The Get procedure in a class module is used
More information02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211
02 Features of C#, Part 1 Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211 Module Overview Constructing Complex Types Object Interfaces and Inheritance Generics Constructing
More informationMicrosoft. Microsoft Visual C# Step by Step. John Sharp
Microsoft Microsoft Visual C#- 2010 Step by Step John Sharp Table of Contents Acknowledgments Introduction xvii xix Part I Introducing Microsoft Visual C# and Microsoft Visual Studio 2010 1 Welcome to
More informationArrays, Strings and Collections
Arrays Arrays can be informally defined as a group of variables containing values of the same type and that in some way or another they are related. An array has a fixed size that is defined before the
More informationC# is intended to be a simple, modern, general-purpose, objectoriented programming language. Its development team is led by Anders Hejlsberg.
C# is intended to be a simple, modern, general-purpose, objectoriented programming language. Its development team is led by Anders Hejlsberg. The most recent version is C# 5.0, which was released on August
More informationHierarchical inheritance: Contains one base class and multiple derived classes of the same base class.
1. What is C#? C# (pronounced "C sharp") is a simple, modern, object oriented, and type safe programming language. It will immediately be familiar to C and C++ programmers. C# combines the high productivity
More informationObject-Oriented ProgrammingInheritance & Polymorphism
Inheritance Polymorphism Overriding and Overloading Object-Oriented Programming Inheritance & Polymorphism Inf1 :: 2008/09 Inheritance Polymorphism Overriding and Overloading 1 Inheritance Flat Hierarchy
More informationLangage C# et environnement.net M1 Année
Cahier de TP C# et.net SÉANCE 1 : BASIC OOL CONCEPTS...1 SÉANCE 2 : DELEGATES, EVENTS, THREAD-SAFE CONTROL ACCESS, RESOURCE MANAGEMENT...3 SÉANCE 3 : INHERITANCE, POLYMORPHISM, CONTAINERS, SERIALIZATION...5
More informationC# Programming in the.net Framework
50150B - Version: 2.1 04 May 2018 C# Programming in the.net Framework C# Programming in the.net Framework 50150B - Version: 2.1 6 days Course Description: This six-day instructor-led course provides students
More informationOsp::Base::Collection
Osp::Base::Collection Contents Collections Interfaces and Enumerators Helpers Lists Maps and MultiMaps Stack and Queue 2 Introduction A collection means an aggregation of similar objects. The collection
More informationModule 5: Programming with C#
Module 5: Programming with C# Contents Overview 1 Lesson: Using Arrays 2 Lesson: Using Collections 21 Lesson: Using Interfaces 35 Lesson: Using Exception Handling 55 Lesson: Using Delegates and Events
More informationThe Microsoft.NET Framework
Microsoft Visual Studio 2005/2008 and the.net Framework The Microsoft.NET Framework The Common Language Runtime Common Language Specification Programming Languages C#, Visual Basic, C++, lots of others
More informationEEE-425 Programming Languages (2013) 1
2 Learn about class concepts How to create a class from which objects can be instantiated Learn about instance variables and methods How to declare objects How to organize your classes Learn about public
More informationDC69 C# &.NET JUNE C# is a simple, modern, object oriented language derived from C++ and Java.
Q.2 a. What is C#? Discuss its features in brief. 1. C# is a simple, modern, object oriented language derived from C++ and Java. 2. It aims to combine the high productivity of Visual Basic and the raw
More informationMultiple Choice: 2 pts each CS-3020 Exam #3 (CH16-CH21) FORM: EX03:P
Multiple Choice: 2 pts each CS-3020 Exam #3 (CH16-CH21) FORM: EX03:P Choose the BEST answer of those given and enter your choice on the Answer Sheet. You may choose multiple options, but the point value
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationCIS 3260 Sample Final Exam Part II
CIS 3260 Sample Final Exam Part II Name You may now use any text or notes you may have. Computers may NOT be used. Vehicle Class VIN Model Exhibit A Make Year (date property/data type) Color (read-only
More informationLampiran B. Program pengendali
Lampiran B Program pengendali #pragma once namespace serial using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms;
More informationDepartment of Networks College of Bardarash Technical Institute DUHOK Polytechnic University Subject: Programming Fundamental by JAVA Course Book
1 Department of Networks College of Bardarash Technical Institute DUHOK Polytechnic University Subject: Programming Fundamental by JAVA Course Book Year 1 Lecturer's name: MSc. Sami Hussein Ismael Academic
More informationLet s get started! You first need to download Visual Studio to edit, compile and run C# programs. Download the community version, its free.
C# Mini Lessons last update May 15,2018 From http://www.onlineprogramminglessons.com These C# mini lessons will teach you all the C# Programming statements you need to know, so you can write 90% of any
More information