Awp Practical Sem5
Awp Practical Sem5
T.Y. BSc.IT
Semester – 5
2022-23
ADVANCED WEB PROGRAMMING
Journal
Guidance Teacher :
Student Name:
1
University of Mumbai
Certificate
This is to certify that Mr/Ms. ANIKET SANJAY DURGAWALE of TY BSc .I.T.
Semester 5 has completed the specified term/Project work in the subject of
ADVANCED WED PROGRAMMING Project Titled in satisfactorily manner
within this institute as laid down by University of Mumbai during the
academic year 2022 to 2023.
Examiner
2
Index
Sr. PRACTICAL NAME Pg No
No
1 Write a program to input 4 numbers and print their product. 4
3
PRACTICAL NO : 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
class Program
a=Convert.ToInt32 (Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
c = Convert.ToInt32(Console.ReadLine());
d = Convert.ToInt32(Console.ReadLine());
add = a + b + c + d;
multi = a * b * c * d;
div = a / b / c / d;
Console.ReadLine();
4
}
OUTPUT:-
5
PRACTICAL NO : 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication3
class Program
string s1 = "abc";
string s2 = "pqr";
Console.WriteLine("string methods:\n");
Console.ReadLine();
6
OUTPUT:-
7
PRACTICAL NO : 3
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication5
class Program
char ch;
Console.WriteLine("Enter Alphabet");
ch = Convert.ToChar(Console.ReadLine());
switch (Char.ToLower(ch))
case 'a':
Console.WriteLine("Vowel");
Console.ReadLine();
break;
case 'e':
Console.WriteLine("Vowel");
Console.ReadLine();
break;
case 'i':
Console.WriteLine("Vowel");
Console.ReadLine();
break;
8
case 'o':
Console.WriteLine("Vowel");
Console.ReadLine();
break;
case 'u':
Console.WriteLine("Vowel");
Console.ReadLine();
break;
default:
Console.WriteLine("Not a Vowel");
Console.ReadLine();
break;
OUTPUT:-
9
PRACTICAL NO : 4
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication6
class Program
Console.WriteLine(color);
}
Console.ReadLine();
OUTPUT:-
10
PRACTICAL NO : 5
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace methodoverloading
class Program
Console.WriteLine("sum of interger" + "" + a + "" + "and" + "" + "" + b + "" + "is:-" + (a + b));
Console.WriteLine("sum of float"+""+a+""+"and"+"+"+b+"is:-"+(a+b));
Console.WriteLine("sum of double"+""+a+""+"and"+""+""+b+"is:-"+(a+b));
Console.WriteLine("Function overloading");
sum (2,3);
sum (3.4,4.5);
11
sum (1.343,1.763);
Console.ReadKey();
OUTPUT:-
12
PRACTICAL NO : 6
Q6. Write a program to implement multiple inheritance.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace multiInherit
{
public class A
{
public A()
{
Console.WriteLine("Hi, I am from class A");
}
}
public class B:A
{
public B()
{
Console.WriteLine("Hi, I am from class B i.e child of
class B");
}
}
public class C:B
{
public C()
{
Console.WriteLine("Hi, I am from class C i.e child of
class B");
13
}
}
class program
{
static void Main(string[] args)
{
C C2=new C();
Console.ReadKey();
}
}
}
OUTPUT:-
14
PRACTICAL NO : 7
Q7. Write a program to implement single inheritance
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Singleinheritance
class shape
drawcolor = (ConsoleColor)color;
Console.ForegroundColor = drawcolor;
width = w;
height = h;
15
public double getArea()
radius = r;
class Program
r1.setw(6);
r1.seth(7);
c1.setr(8);
r1.setcolor(9);
r1.setcolor(10);
Console.ReadKey();
16
}
OUTPUT:-
17
PRACTICAL NO : 8
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication20
18
int r;
r = Convert.ToInt32(TextBox1.Text) * Convert.ToInt32
19
Output:-
20
PRACTICAL NO : 9
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication22
TextBox3.Text = (Convert.ToInt32(TextBox1.Text) +
Convert.ToInt32(TextBox2.Text)).ToString();
TextBox3.Text=(Convert.ToInt32(TextBox1.Text) - Convert.ToInt32(TextBox2.Text)).ToString();
21
{
TextBox3.Text = (Convert.ToInt32(TextBox1.Text) *
Convert.ToInt32(TextBox2.Text)).ToString();
TextBox3.Text = (Convert.ToInt32(TextBox1.Text) /
Convert.ToInt32(TextBox2.Text)).ToString();
22
Output:-
23
PRACTICAL NO : 10
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication5
try
int resultval;
24
Label2.Text = "exception catch here details:" + ex.ToString();
finally
Output:-
25