You are on page 1of 23

Name- Tanmay Agrawal Roll No.

:- 2100320100169 Group:- C1

Experiment – 1

Aim - Write HTML/JAVA script to display your CV in navigator, your Institute website,
Department Website and Tutorial website for special subject.

Code -
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your CV</title>
<style>
body { font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: rgb(246, 247, 247);
color:rgb(7, 0, 0); }
.container { max-width: 800px;
margin: 20px auto;
padding: 20px;
background-color: #ffff;
border: 2px solid black;
border-radius: 20px ;
box-shadow: 0 10px 10px #6a272fcd; }
h1, h2, h3 { color: #333; }
p { margin-bottom: 15px;}
</style>
</head>
<body>
<div class="container">

1
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

<header>
<h1>Tanmay Agrawal</h1>
<hr>
<p>Email: tanmayagrawal2764@gmail.com</p>
<p>Phone: 8439102764</p>
</header>
<section>
<h2>Education</h2>
<hr>
<p>Degree: B.Tech</p>
<p>Institution: ABES</p>
<p>Year of Graduation: 2025</p>
</section>
<section>
<h2>Experience</h2>
<hr>
<p>Position: My Position</p>
<p>Company/Organization: Company Name</p>
<p>Duration: 06/2024 - 5/2025 </p>
<p>Description: Interested in Competitive Programming, Data Structures and MERN
Stack development</p>
</section>
<section>
<h2>Skills</h2>
<hr>
<p>- Python</p>
<p>- MERN Stack</p>
<p>- DSA</p>
</section>
<footer>
<p>References available upon request.</p>

2
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

</footer>
</div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Resume</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #ffffff;
}
.container {
max-width: 800px;
margin: 20px auto;
padding: 20px;
border: 1px solid rgb(17, 16, 16);
border-radius: 25px;
background-color: #fff;
box-shadow: 0 10px 25px rgba(0, 174, 255, 0.255);
}
h1 { text-align: center;
color: #007bff; }
p{ color: rgb(100, 225, 221); }

3
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

a { color: #000000;
text-decoration: none;
transition: color 0.3s ease; }
a:hover { color: #8000b3;
text-decoration: underline; }
ul { padding-left: 20px; }
li { margin-bottom: 10px; }
</style>
</head>
<body>
<div class="container">
<h1>My Resume</h1>
<p>This is my resume. Below you can find links to other relevant websites:</p>
<li><a href="web1.html" target="_blank">View Resume </a></li>
<li><a href="http://www.abes.ac.in" target="_blank">Institute Website
<ul></a></li>
<li><a href="http://www.yourdepartmentwebsite.com" target="_blank">Department
Website</a></li>
<li><a href="http://www.youtube.com" target="_blank">Tutorial Website for Specific
Subject</a></li>
</ul>
</div>
<script>
</script>
</body>
</html>

4
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

5
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

Experiment – 2

Aim – Write an HTML program to design an entity from of student detail and send it to store
at database server like SQL, Oracle on MS Access.
Code-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Admission Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: rgb(255, 255, 255);
margin: 0;
padding: 0; }
.container {
max-width: 800px;
margin: 20px auto;
background-color: lemonchiffon;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgb(246, 183, 68); }
h2 {
text-align: center; }
.form-group {
margin-bottom: 20px; }
label {
font-weight: bold; }
input[type="text"],
6
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

input[type="email"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #ff1e00;
border: 1px solid;
border-radius: 5px;
box-sizing: border-box;
margin-top: 5px;
font-size: 16px; }
input[type="submit"] {
background-color: #4881de;
color: #ffff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px; }
input[type="submit"]:hover {
background-color: #9c4444; }
.logo {
text-align: center;
margin-bottom: 20px; }
.logo img {
width: 150px;
height: auto; }
.button{
text-align: center; }
body{

7
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

background-image: linear-gradient(120deg,); }
</style>
</head>
<body>
<div class="container">
<div class="logo">
<img src="./abes.jpg" alt="College Logo">
</div>
<h2>Student Admission Form</h2>
<form action="#" method="POST">
<div class="form-group">
<label for="fullname">Full Name:</label>
<input type="text" id="fullname" name="fullname" required>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
</div>
<div class="form-group">
<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob" required>

8
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

</div>
<div class="form-group">
<label for="address">Address:</label>
<textarea id="address" name="address" rows="4" required></textarea>
</div>
<div class="form-group">
<label for="course">Course:</label>
<input type="text" id="course" name="course" required>
</div>
<div class="form-group">
<label for="class10_grade">Grade in Class 10:</label>
<input type="text" id="class10_grade" name="class10_grade" required>
</div>
<div class="form-group">
<label for="class12_grade">Grade in Class 12:</label>
<input type="text" id="class12_grade" name="class12_grade" required>
</div>
<div class="form-group">
<label for="extracurricular">Extracurricular Activities:</label>
<textarea id="extracurricular" name="extracurricular" rows="4"></textarea>
</div>
<div class="button" >
<input type="submit" value="Submit">
</div>
</form>
</div>
</body>
</html>

9
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

10
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

Experiment – 3
Aim – Write DTD and XML code for the student admission form
DTD Code –
<!DOCTYPE StudentAdmissionForm [
<!ELEMENT StudentAdmissionForm (Student)>
<!ELEMENT Student (FullName, Email, Gender, DateOfBirth, Address, Course,
GradeInClass10, GradeInClass12, ExtracurricularActivities)>
<!ELEMENT FullName (#PCDATA)>
<!ELEMENT Email (#PCDATA)>
<!ELEMENT Gender (#PCDATA)>
<!ELEMENT DateOfBirth (#PCDATA)>
<!ELEMENT Address (#PCDATA)>
<!ELEMENT Course (#PCDATA)>
<!ELEMENT GradeInClass10 (#PCDATA)>
<!ELEMENT GradeInClass12 (#PCDATA)>
<!ELEMENT ExtracurricularActivities (#PCDATA)>
]>
XML CODE-
<?xml version="1.0" encoding="UTF-8"?>
<StudentAdmissionForm>
<Student>
<FullName>Tanmay Agrawal</FullName>
<Email>tanmayagrawal2764@gmail.com</Email>
<Gender>Male</Gender>
<DateOfBirth>22-04-2004</DateOfBirth>
<Address>Sambhal</Address>
<Course>B.Tech</Course>
<GradeInClass10>94.8</GradeInClass10>
<GradeInClass12>94.4</GradeInClass12>
<ExtracurricularActivities></ExtracurricularActivities>
</Student>

11
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

</StudentAdmissionForm>
Output-

12
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

Experiment – 4

Aim – Write program to Design HTML form for keeping student record and validate it using
Java script.
Code-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Admission Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: rgb(255, 255, 255);
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 20px auto;
background-color: rgb(227, 119, 137);
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 15px rgb(163, 148, 215);
}
h2 {
text-align: center;
}
.form-group {
margin-bottom: 20px;
13
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

}
label {
font-weight: bold;
}
input[type="text"],
input[type="email"],
select,
textarea {
width: 100%;
padding: 10px;
border: 1px solid #ff1e00;
box-sizing: border-box;
margin-top: 5px;
font-size: 16px;
}
input[type="submit"] {
background-color: #4881de;
color: #ffff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #9c4444;
}
.logo {
text-align: center;
margin-bottom: 20px;

14
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

}
.logo img {
width: 150px;
height: auto;
}
.button{
text-align: center;
}
body{
background-image: linear-gradient(120deg,);
}
</style>
</head>
<body>
<div class="container">
<div class="logo">
<img src="logo.jpg" alt="College Logo">
</div>
<h2>Student Admission Form</h2>
<form id="admissionForm" action="#" method="POST" onsubmit="return
validateForm()">
<div class="form-group">
<label for="fullname">Name:</label>
<input type="text" id="fullname" name="fullname" required>
</div>
<div class="form-group">
<label for="email">Email ID:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="gender">Gender:</label>

15
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

<select id="gender" name="gender" required>


<option value="">Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
</div>
<div class="form-group">
<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob" required>
</div>
<div class="form-group">
<label for="address">Permanent Address:</label>
<textarea id="address" name="address" rows="4" required></textarea>
</div>
<div class="form-group">
<label for="course">Course:</label>
<input type="text" id="course" name="course" required>
</div>
<div class="form-group">
<label for="class10_grade">Grade in Class 10:</label>
<input type="text" id="class10_grade" name="class10_grade" required>
</div>
<div class="form-group">
<label for="jee_rank">JEE RANK:</label>
<input type="text" id="jee_rank" name="jee_rank" required>
</div>
<div class="form-group">
<label for="class12_grade">Grade in Class 12:</label>
<input type="text" id="class12_grade" name="class12_grade" required> </div>

16
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

<div class="form-group">
<label for="extracurricular">Extracurricular Activities:</label>
<textarea id="extracurricular" name="extracurricular" rows="4"></textarea>
</div>
<div class="button">
<input type="submit" value="Submit">
</div>
</form>
</div>
<script>
function validateForm() {
var form = document.getElementById("admissionForm");
var inputs = form.querySelectorAll("input, select, textarea");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].hasAttribute("required") && inputs[i].value === "") {
alert("Please fill in all required fields.");
return false;
}
}
var emailInput = form.querySelector('input[type="email"]');
var email = emailInput.value;
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
alert("Please enter a valid email address.");
return false;
}

return true;
}
</script></body></html>

17
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

Output-

Experiment – 5

Aim – Write program to implement different types of method overloading in java


Code-
Method Overloading-
import java.io.*;
class Product {
public int multiply(int a, int b) {
int prod = a * b;
return prod;

18
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

}
public int multiply(int a, int b, int c) {
int prod = a * b * c;
return prod;
}
public int sum(int a, int b) {
int sum = a + b;
return sum;
}
public int sum(int a, int b, int c) {
int sum = a + b + c;
return sum;
}
}
class MethodOverloadingExample {
public static void main(String[] args) {
Product ob = new Product();
int prod1 = ob.multiply(1, 2);
System.out.println("Product of the two integer value :" + prod1);
int prod2 = ob.multiply(1, 2, 3);
System.out.println("Product of the three integer value :" + prod2);
int sum1 = ob.sum(1, 2);
System.out.println("Sum of the two integer value :" + sum1);
int sum2 = ob.sum(1, 2, 3);
System.out.println("Sum of the three integer value :" + sum2);
}
}
Output-

19
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

1. Changing the Number of Parameters-


import java.io.*;
class MathOperations {
public int multiply(int a, int b) {
return a * b;
}
public int multiply(int a, int b, int c) {
return a * b * c;
}
public int sum(int a, int b) {
return a + b;
}
public int sum(int a, int b, int c) {
return a + b + c;
}
}
public class Main {
public static void main(String[] args) {
MathOperations math = new MathOperations();
System.out.println("Product of 2 integers: " + math.multiply(2, 3));
System.out.println("Product of 3 integers: " + math.multiply(2, 3, 4));
System.out.println("Sum of 2 integers: " + math.sum(2, 3));
System.out.println("Sum of 3 integers: " + math.sum(2, 3, 4));

20
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

}
}
Output-

2. Changing Data Types of the Arguments-


import java.io.*;
class Product {
public int Prod(int a, int b, int c) {
int prod1 = a * b * c;
return prod1;
}
public double Prod(double a, double b, double c) {
double prod2 = a * b * c;
return prod2;
}
public int Sum(int a, int b, int c) {
int sum = a + b + c;
return sum;
public double Sum(double a, double b, double c) {
double sum = a + b + c;
return sum;
}
}

21
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

public class Main{


public static void main(String[] args) {
Product obj = new Product();
int prod1 = obj.Prod(1, 2, 3);
System.out.println("Product of the three integer value :" + prod1);
double prod2 = obj.Prod(1.0, 2.0, 3.0);
System.out.println("Product of the three double value :" + prod2);
int sum1 = obj.Sum(1, 2, 3);
System.out.println("Sum of the three integer value :" + sum1);
double sum2 = obj.Sum(1.0, 2.0, 3.0);
System.out.println("Sum of the three double value :" + sum2);
}
}

3. Changing the Order of the Parameters of Methods-


import java.io.*;
class MathOperations {
public float multiply(float a, int b) {
return a * b;
}
public float multiply(int b, float a) {
return a * b;
}
public float sum(float a, int b) {

22
Name- Tanmay Agrawal Roll No.:- 2100320100169 Group:- C1

return a + b;
}
public float sum(int b, float a) {
return a + b;
}
}
public class Main {
public static void main(String[] args) {
MathOperations math = new MathOperations();
System.out.println("Product of float and int: " + math.multiply(2.5f, 3));
System.out.println("Product of int and float: " + math.multiply(3, 2.5f));
System.out.println("Sum of float and int: " + math.sum(2.5f, 3));
System.out.println("Sum of int and float: " + math.sum(3, 2.5f));
}
}
Output-

23

You might also like