0% found this document useful (0 votes)
27 views

Assignment - 2

ADA rgpv btech

Uploaded by

himani namdeo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Assignment - 2

ADA rgpv btech

Uploaded by

himani namdeo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 65

PRACTICAL JOURNAL OF Dot Net

BE:II Year IV Sem

Department of Computer Science and Information


Technology

NAME: HIMANI NAMDEO

BRANCH: CI – 1

SECTION: 01

ROLL NO: 0827CI221061

SESSION: JAN – JUNE 2024

S.NO NAME OF EXPERIMENT DATE OF FAC


SUBMISSION SIG

2. Classes and Objects


2.1.Program to demonstrate class and objects

2.2 WAP to demonstrate multiple object by considering


the following : classname_student, data member
stud_name(string), rollno(int), Objectname-s1,s2.

2.3 WAP to demonstrate accessing data


member of one class into other class by
considering the following:-Classname 1:
student ,Classname 2: stud.

3 Inheritance

3.1 WAP to demonstrate single-level inheritance by


considering the following Base className = vehicle,
derived className = car, data member = Type.

3.2 WAP to demonstrate multilevel inheritance with


attributes: class name vehicle, derive class 1 name
car, derive class 2 name bike, data member vehicle.

3.3 wap to demonstrate multiple inheritance with


attributes :- interface shape , function area and
interface colour

3.4 Wap to demonstrate hirarchical inheritance with


attributes :- class name vehicle , derive class 1 name
car , derive class 2 name bike , data member vehicle.

4 Compile time polymorphism

4.1 Wap to demonstrate operator overloading in c#.


4.2 WAP to demonstrate the concept of default
constructor function overloading by considering the
following: method name = area, to calculate area of
triangle, rectangle and square.

5 Run time polymorphism

5.1 WAP demonstrates method overriding by


considering the following: class name = animal, derived
class name1 = dog, derived class naem2 = snake, data
member = animal name, member function= move.

6 Constructor

6.1 Wap to demonstrate parameterized constructor in c# using


this keyword
By considering the following Class name car and Data
member model no. and Model name

7 Data abstraction

7.1 wap to demonstrate data abstraction using private


keyword by considering the following class name
student (data members name(string) , member function
print().

7.2 wap to demonstrate data abstraction using public


keyword by considering the following class name faculty
(data members name(string) , member function
display().

7.3 wap in c# to demonstrate data abstraction using


protected keyword by considering the following class
name1 student , class name2 faculty (data members
Student name(string) . using syntax class faculty:student
without using member function.
8 Indexers

8.1 Program to demonstrate indexer.

8.2 Program to demonstrate indexer with int data type

8.3 WAP to demonstrate 2D indexer with int datatype in C#

9 Delegates

9.1 WAP to study concept of delegates in C#

9.2 WAP to demonstrate multiple delegates to calculate


multiplication and division of a given no. by considering
the following class name your name delegate name1 =
mult delegate 2 name = viv member function1 =
multiplication, member function2 = division, data member
argument for delegation = pdrs.

10 Reflection in c#

10.1 wap to demonstrate reflection by declaring and


initialising string to display information like name , full
name , namespace and its base type.

10.2 wap to demontrate the concept of reflection to obtain


the metadata of a class its data member, member func , default
constructor and parametrised constructor.

11 String builder in c#

11.1 Append method in StringBuilder.

11.2 Insert in stringbuilder

11.3 Remove in stringbuilder

11.4 Replace in stringbuilder

11.5 Clear method in StringBuilder


12.2 WAP to demonstrate Exception Handling Using Try
finally Block to print invalid index as an exception while
entering index out of range and to display an element at
index 3 using finally block.

12.3 Wap to demonstrate Exception Handling Using throw


while entering invalid index number by using if condition.

13 Windows services

13.1 Creating windows services.

14 Reading of xml file

14.1 WAP to demonstrate Reading of an XML file from


your system by considering the following. YournAME.xml.

14.2 WAP to demonstrate reading of all elements from a


given XML file with its description by considering the
following. YourName.xml.

15 Writing of xml file

15.1 WAP to demonstrate writing of an XML file by


considering the following File Name:
Employee.xml.

16 Sending mail using smtp

16.1 Wap to demonstrate the concept of sending mail


using smtp in c#.

12 Exception handling in c#
12.1 WAP to demonstrate exception Handling In C# Using
Try catch block by considering the following Array Name
arr and enter five element exception to print 7 index
element.
17 DLL component in c#

17.1 wap to demonstrate building DLL component in


c# to print addition of two no. And to find square of a
no.
Assignment - 2
CLASSES AND OBJECTS

2.1) Write a program to demonstrate class and object by considering the


following - Class name - Student Object name - s1 Data members
stud_name(string),roll_no(int),mobile_no(int).

Output-
2.2) Write a program to demonstrate class and object by considering the
following and creating multiple objects - Class name - Student Object name
- s1,s2 Data members - stud_name(string),roll_no(int),mobile_no(int).

Output-
2.3)Write a program to demonstrate of accessing data members of one
class into another class by considering the following - Class name1
Student Class name2 - Stud Object name - s1 Data members
stud_name(string)

Output-

Assignment - 3
INHERITANCE

3.1) Write a program to demonstrate single level inheritance by considering


the following - Class name - Vehicle Derived class name - Car Data member
- vehicle_type.
Output-
3.2) Write a program to demonstrate multilevel inheritance by considering
the following - Class name - Vehicle Derived class1 - Car Derived class2 -
Bike Data member - vehicle_type
Output-

3.3) Write a program to demonstrate multiple level inheritance by


considering the following - Class name - Rectangle Interface1 - Shape
Interface2 - Color Method - GetArea()
Output-
Assignment - 4
COMPILE TIME POLYMORPHISM
4.1)Write a program to demonstrate method overriding by considering the
following - Base Class Name - Animal Derived Class Name 1 - Dog Derived
Class Name 2 - Snake Data Member - Animal name Member function - Move
Output-
4.2)Write a program to demonstrate method overloading by considering the
following - Member function - Area() To calculate the area of
triangle,rectangle and square.
Output-

4.3)Write a program to demonstrate operator overloading for negation


operator by considering the following - Class Name - Student Data Member
- Marks Member Function - Display
Output-

Assignment - 5
RUN TIME POLYMORPHISM

5.1 WAP demonstrates method overriding by considering the following: class name =
animal, derived class name1 = dog, derived class naem2 = snake, data member animal
name, member function= move.

OUTPUT-
Assignment - 7
CONSTRUCTOR

6.1 Wap to demonstrate parameterized constructor in c# using this


keyword .By considering the following Class name car and Data member
model no. and Model name

OUTPUT-
Assignment - 7
DATA ABSTRACTION

7.1) write a program to demonstrate data abstraction using private keyword

by considering the followingclass name - student data member - name

string type member function - print function

Result-
7.2- write a program to demonstrate data abstraction using public keyword

by considering the followingclass name - faculty data member -

name(string) member function - display

OUTPUT-

7.3 - write a program to demonstrate data abstraction using private public


and protected keyword in C#-
OUTPUT-

Assignment - 8
INDEXER
8.1) Write a program to demonstrate Indexer in C# -

Output -
8.2) Write a program to demonstrate 1D Indexer with “int” datatype in C# -
Output-

8.3) Write a program to demonstrate 2D Indexer with “int” datatype in C# -


Output-

Assignment - 9
DELEGATE
9. 1)Write a program to demonstrate delegates in C# -
Output-

9.2) Write a program to demonstrate multiple delegates to calculate


multiplication and division of a given no. by considering the following-
Class name - Divya
Delegate name1- multi
Delegate name2 - div
Member function1 - multiplication()
Member function2 - division()
Argument of delegation - p,q,r,s

Output-
Assignment 10
REFLECTION
10.1 Write a program to demonstrate reflection by declaring & initialising a
type string to display information like Name,Full Name,Namespace & its
base type.

Output-

10.2- Write a program to demonstrate concept of reflection to obtain the


metadata of a class its datamember , member function, default constructor
and parametrized constructor.
Assignment 11
STRING BUILDER
11.1)Write a program to demonstrate Append function in String Builder
class by considering the following -
11.2)Write a program to demonstrate

Class name - StringBuild


Object name - sb
String - My name is Divya Jain

Output-

Remove function in String Builder


11.3)Write a program to demonstrate

class -

Output-
11.4)Write a program to demonstrate

Replace function in String Builder


class -

Output-
11.5)Write a program to demonstrate

Insert function in String Builder class


-

Output-
11.6)Write a program to demonstrate

Clear function in String Builder class -

Output-
Assignment 12
EXCEPTION HANDLING
12.1 WAP to demonstrate exception Handling In C# Using Try catch block
by considering the following Array Name arr and enter five element
exception to print 7 index element.
OUTPUT-
12.2 WAP to demonstrate Exception Handling Using Try finally Block to
print invalid index as an exception while entering index out of range and to
display an element at index 3 using finally block.

OUTPUT-
12.3 Wap to demonstrate Exception Handling Using throw while entering
invalid index number by using if condition.

OUTPUT-
Assignment 13
Introduction to Window Services
13.1- All Screenshots of performing windows services.
Window Service Installer
Assignment 14
Reading Xml File
14.1 Write a Program to demonstrate reading on xml file from your system
By considering your following-
1-filename Divya.xml

Output-
14.2 WAP to demonstrate reading of all elements from a given XML file with
its description by considering the following. YourName.xml.
Assignment
Output-
15
WRITING OF XML FILE
15.1- Write a program to demonstrate Writing a Xml file in C# by
considering the followingFilename- employee.xml
Start element name - employee
Inside elements - name,id,dept
Display the following output-
Assignment

Output-
16
SENDING MAIL USING SMTP
16.1- Write a program to demonstrate the concept of sending email using
smtp in C# by using System.Net.mail.Package and display the following
output.(Sending email).
Assignment

OUTPUT-

17 DDL COMPONENT IN C#
17.1- Write a program to demonstrate .NET component creation in C# to
calculate addition of two numbers and square of a given number.
Assignment

OUTPUT-

You might also like