Vous êtes sur la page 1sur 7

Class: derived from Classification

DEF:
Classification information into organized and systematic manner is called Class. DEF 2: The written description of an object is called Class.

Object:
Object is an occurrence or instance of a class. There are two kinds of classes 1 Customized data type 2 Abstract data type (ADT)

ADT:
There are three conditions for ADT 1 Declaration of data 2 Declaration of operation 3 Encapsulation .>><<........

e.g Class student { Private int rollno; Member access modifier or specifier <-----------Private float marks; Private int fee; Public void input() {

. } Public void output() { } } .>><<........ Class is a key word and public members are interface of class. API: Application programming interface (Class libraries) SDK: Software development kit SDK includes: 1 API, 2- Documentation, 3- Sample code

CLASS:
1 Member Function 2 Data Members 3 Constructer

Constructer:
1 Not a normal function and construct at call only first time 2 Same name as class 3 No return type because it returns reference of object.

Three Type of Constructor:


1 Default Constructor 2 Parameterized Constructor 3 Copy Constructor

Function Over Loading:


Change the signature.

Signature Change means


1 change the name of function 2 change the number of arguments 3 change the arguments 4 change the sequence of arguments e.g. Class student { Private int rollno; Private float marks: // 1ST TYPE Student (); { . . } //2nd TYPE Student (int a); { . . } //3rd TYPE

Student (int a float b); { . . } //4th TYPE Student (float b int a); { . . } //5th TYPE Student1 (); { . . } } ..>><<

Function Overriding:
Mean that same function with same signature. So overriding is not allowed in this manner but in inheritance it is allowed.

Copy Constructer:
Public student (student s) { rollno = s.rollno;

fee = s.fee; }

Multiple Inheritances:
Person (class) ---------------------Student (class) | | Employee (class)

Multilevel inheritance:

Person (class)- Student (class) - Employee (class)

Reference includes:
1 Base address of object 2 Base address of data 3 Meta data

Name Space:
1 Container of class 2 Logical organized Name Space IUB { Class student { }

} Name space fee { Class student { .. . } } Call IUB.student Call fee.student In both calls we have seen that a function with same name is called but due to the name space both the call are not same.

Partial:
When more than one developer are working at one class than they use partial key word to join this class and make one code for compiler .compiler automatically join this class due to the usage of partial keyword in all pieces class name must same. Class is reference type (for long data) Structure is value type (for small data)

Region:
# Region here some description Here some code which you want to minimize and maximize when we need. This technique is used to minimized the code. At the end we use #endregion Use of THIS keyword:

Class student { Private int t; (global) Public void first () { Int t =10; (local) This.t =78; (this assign to global) // this key word is use for specific variable t which is defined in the body of class called global not in the function variable called local variable } }

Pause layout:
Stops the layout to execute means stop pasting the form at screen while the changing in design has done because default constructer make the form with default value so the compiler pause the layout and when all the changing functions completed then compiler RESUME the layout.

Vous aimerez peut-être aussi