Вы находитесь на странице: 1из 40

ORIENTAL INSTITUTE OF SCIENCE & TECHNOLOGY,

BHOPAL

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

LAB MANUAL

Subject: Web Engineering Lab File


Subject Code: CS 7003
Session: July-Nov, 2019

Submitted to: Submitted by:


Prof. Ayushi Aarzare Prafful Kumar Lachhwani
0105CS161066
List of Experiments

Date of
Sr. No. Name of Experiment Signature Remark
Performance
1 Introduction to HTML, CSS, BOOTSTRAP, SQL

2 Create your Resume using HTML

3 Create a navigation bar in HTML

4 Html code for alignment (left right)

5 Code for Grouping Selector including comment

6 Create OIST index page.

Html document using image maps (different


7
shapes like rectangle, circle etc.)

8 Design Indian Flag using Frames

Create HTML form for training and placement of


9
OIST
Design code for Internal and external statements
to change the colour of text inside <b> element to
10
blue and change the font height of the text inside
h2 element
Consider the sample code style the paragraph
element to have a padding of 5px on the top,
11 100px on the left, 15px on the bottom, 50px on
the right with 1px border and 5px margin on all
the sides

12 JavaScript for control browser


Experiment – 1

Objective: Study and practice of internal DOS commands.

Q1. Explain the usage of the Internal DOS commands given below with the help of an example.
Internal dos command:

(A) General Purpose command:

1. CLS

2. DIR

3. VER
4. VOL

5. DATE

6. TIME

(B) File Related Command:

7. COPYCON

8. TYPE

9. COPY
10. REN

11. DEL

(C) Directory Related Command:

12. CD

13. MD

14. RD
External dos command:

15. MORE

16. MEM

17. MOVE

18. FC

19. CHKDSK

20. LABEL

21. DOSKEY
22. FORMAT

Experiment - 2

Objective: Study and practice of Basic linux Commands – ls, cp, mv, rm, mkdir, cat, touch, cd, gedit,
date, cal, who, whoiam, pwd etc.

Q1. Explain the usage of all the Linux Commands given below with the help of an example.

1. ls

2. cp

3. mv

4. rm

5. who
6.whoami

7. pwd

8. cal

9. date

10. touch

11. cat

12. mkdir

13. cd
14. gedit

Experiment - 3

Aim:- Study and Practice of MS windows – Folder related operations, My-Computer, window explorer,
Control Panel

Control Panel-

Control Panel is a part of the Microsoft Windows graphical user interface which allows users to view and
manipulate basic system settings and controls via applets, such as adding hardware, adding and
removing software, controlling user accounts, and changing accessibility options. Additional applets can
be provided by third party software.
The Control Panel has been an inherent part of the Microsoft Windows operating system since its first
release (Windows 1.0), with many of the current applets being added in later versions. Beginning
with Windows 95, the Control Panel is implemented as a special folder, i.e. the folder does not physically
exist, but only contains shortcuts to various applets such as Add or Remove Programs and Internet
Options. Physically, these applets are stored as .cpl files. For example, the Add or Remove
Programs applet is stored under the name appwiz.cpl in theSYSTEM32 folder.

My Computer

A section of Microsoft Windows that was introduced with the release of Microsoft Windows 95 and
included with all versions of Windows after that. My Computer allows the user to explore the contents
of their computer drives as well as manage their computer files. In the picture to the right, is an
examples of the My Computer icon in Microsoft Windows XP, the Computer icon in Windows Vista and
Windows 7, and This PC icon introduced with Windows 8. Although the name has changed, this icon still
acts the same as My Computer.

How to open My Computer


In all versions of Windows, pressing Windows key + E opens My Computer (Explorer).
or
1. Get to the Windows Desktop and open Start Menu, or navigate to the Start Screen if you are
using Windows 8.
2. In earlier versions of Windows, after clicking Start, select My Computer. Or, on the
Desktop, double-click the My Computer icon. In Windows Vista and Windows 7,
select Computer from the Start menu. In Windows 8 and Windows 10, select This PC from
the Windows Files Explorer.
The following images show examples of the My Computer option in both new and old versions of
Windows.
Windows XP
Note: In Windows Vista and Windows 7, My Computer is called "Computer" and is accessed through the
Start menu, as shown below.

Windows 7
Windows Explorer

Windows Explorer is the operating system's file and folder manager. Alternatively referred to as File
Explorer or Windows Explorer, Explorer is a file browser found in Microsoft Windows 95 and above to
explore and manage the drives, folders, and files on the computer. Although similar, Microsoft Windows
Explorer is not the same as "My Computer" and is not "Microsoft Internet Explorer", even though
Internet Explorer is sometimes improperly referred to as Explorer.

Windows Explorer is a file management tool that lets you create, rename, and delete folders. It also
allows you to copy, print, move, delete, rename, and manage files.

How to open Windows Explorer:

 Right-click the "Start" menu and click "Open Windows Explorer." Windows Explorer opens for
you to browse your hard drive's contents.
 Press the "Windows" and "E" keys on the keyboard and Windows Explorer opens for you to
browse your hard drive's contents.
 Click the "Start" menu and type "explorer" in the instant search box. Windows Explorer
appears in the list for you to click.

How to explore Windows Explorer:

 Right-click the Start button and then click Explore. (Windows 7 finally renamed this option
Open Windows Explorer.) 3. Navigate your Programs menu until you find the Accessories
folder; Explorer can be found inside it.

Exploring My Computer:

1. 1. Exploring My Computer The Desktop Computer Lab Version


2. 2. Exercise #1 Step 1: Move all SOFTWARE icons to the right side of your screen. Step 2: On your
paper draw 3 software icons on the right side and 3 other icons on the left. Not Software
3. 3. Exercise #2 Step 1: Find the Start Button on your screen. Step 2: On your paper, draw the start
button in the appropriate place. Make it look like the start button on the screen. Not Software
4. 4. Exercise #3 Step #1: Find your folder. Step #2: Circle the icon where you found it on your
paper. Not Software
5. 5. Exercise #4 Step 1: Find the desktop of your computer. Step 2: Draw a picture on the desktop
background on your paper. Not Software
6. 6. Check Your Work Your paper should look like this: Not Software
Experiment - 4

Objective: Creation and editing of Text files using MS- word.


You are required to do the following tasks listed below

Where true cooperation is alive, a degree of conflict is also seen as a necessary and useful part of
organizational life. The effective team works through issues of conflict and uses the result to help
achieve objectives. Conflict is so often seen as the opposite of cooperation. It is true that if a group
of people are in constant disagreement they will find achievement difficult, but a certain amount of
conflict also prevents a team becoming complacent and lazy and often is the source of new ideas.
Traditionally, conflict has been seen as something caused by trouble makers or `prima donnas’ and
something which by definition can be avoided or stifled. A more enlightened approach to conflict
suggests that it is inevitable and an integral part of the process of change. If this is true, the
management of conflict should be aid to cooperation, not an obstacle. However, there are two sides
to conflict. One is destructive and unhealthy, the other constructive and healthy. Destructive
conflict, which defeats cooperation, can occur when individuals carefully built images are
threatened, when personalities intrude, when conflict is expected and the expectation becomes
selffulfilling or when two parties are arguing about different things without realizing it. Constructive,
healthy conflict has a problem solving base. Those involved in solving the problems are willing to
sublimate personality differences, to listen to others’ views, to be open and candid to each other, to
be supportive and helpful. With such behavior, not only is each problem solved with total
commitment, but subsequent team interaction becomes more effective, and cooperation improves.
Improve upon the document by doing the following:
a) Use spell checker option to correct spellings.
b) Practice command, Find and Replace Eg. Find the word “prima donna” in your document and
replace it by “PRIMA DONNA”. You may practice with find and replacing characters words,
sentences etc.
c) Divide the whole text you entered into paragraphs and give appropriate sub headings.
d) Insert a picture from clip art.
e) Prepare bulleted list of the words in italics within the paragraph.
f) Insert a table with four rows and two columns
1. Name of team member
2. Job allotted
Experiment - 5

Objective: Creation and Operating Of Spreadsheet Using MS-Excel.


1. Create the following spreadsheet.
2. Use a formula to calculate the Games column by adding the Wins, Losses and Ties.
3. Use a formula to calculate the points. A team gets two points for a win and one for a tie.
4. Use the builtin function 'sum' to calculate the total of the For column and Against column.
5. Sort the teams by Points (highest to lowest), Wins (highest to lowest), and then Team name
(lowest to highest). Note: this means to do one sort - not three.
6. Add your name below the spreadsheet, save and print.
7. Submit your spreadsheet and formulas stapled together.

OHL West Division

G W L T F A P

Erie 22 26 3 188 213

London 31 16 3 236 183

Plymouth 27 17 1 199 170

Sarnia 23 18 8 187 176

SS Marie 14 29 4 187 230

Windsor 14 31 6 208 252

Total:
Experiment – 6

Objective: Creation and Editing Power-Point Slides Using MS- Power Point.
PowerPoint Assignment
Create a PowerPoint Presentation on any topic from basic computer engineering. You need to include
the following Slide elements as explained in the directions below.
Directions:
1. The presentation should be a minimum of 6 slides.
o The first slide should be about the introduction of the topic you have selected.
o Each slide should have a heading.
o All the points on each slide should be in bullets.
o Include the content slide in your presentation.
o The content on each slide should not be in paragraph form.
2. Use at least 3 different types of slides in your presentation.
3. Select a Design Theme
o Change the color theme of the original design theme you selected.
4. Modify your font
o Your text should have at least 3 different font types.
o You should change the font color of some of your text.
5. Include Text Effects/WordArt as your title for the Title Slide.
6. Insert at least 1 Clip Art/Picture per slide to match the topic of the presentation.
o Use the Picture Tools to change the format of each of the ClipArt/Pictures you insert.
7. Insert Text Animations on 6 text or graphical elements in your slides.
Experiment – 7

Objective: Study of SQL commands.

1. SQL CREATE TABLE:

2. SQL INSERT INTO:

3. SQL UPDATE:

4. DROP TABLE:

5. SQL DELETE TABLE:


Experiment - 8

Objective: WAP to illustrate Arithmetic expressions.


Algorithm:
Input : Given two integers
Output::to print the sum of two integers
Steps :
STEP1: Read the Value of A and B.
STEP2: Calculate SUM = A+B.
STEP3: Calculate DIFF=A-B
STEP4:Calculate MUL=A*B
STEP5:Calculate DIV=A/B
STEP6:Print SUM.
STEP7: Stop.

PROGRAM:
OUTPUT:
Experiment – 9

Objective: Write a program to insert the values in a matrix using array.


Algorithm:
Step 1: Start
Step 2: Declare an array and two variables i, j
Step 3: Read elements of array from keyboard.
Step 4: Display an matrix
Step 5: Stop
PROGRAM:
OUTPUT:
Experiment – 10

Objective: Write a program to calculate the square of a number using function.


Algorithm:
Step 1: Start
Step 2: Definition of function
Step 3: declare two variables a and sq in function body;
Step 4: calculate square of a number
Step 5: square function called by main function
Step 6: return output to main function
Step 7: stop

PROGRAM:
OUTPUT:
Experiment – 11

Objective: Write a program to calculate prime number using constructor.


Algorithm:
STEP 1: Start the program.
STEP 2: Declare the class as Prime with data members, Member functions.
STEP 3: Consider the argument constructor Prime() with integer argument.
STEP 4: To cal the function calculate () and do the following steps.
STEP 5: For i=2 to a/2 do
STEP 6: Check if a%i==0 then set k=0 and break.
STEP 7: Else set k value as 1.
STEP 8: Increment the value i as 1.
STEP 9: Check whether the k value is 1 or 0.
STEP 10: If it is 1 then display the value is a prime number.
STEP 11: Else display the value is not prime.
STEP 12: Stop the program.

PROGRAM:
OUTPUT:
Experiment – 12

Objective: WAP to illustrate object and class.


Algorithm:
STEP 1: Start the program.

STEP 2: Declare the class as student with data members,

Member functions.

STEP 3: Create a main function and call the member functions of student class.

STEP 4: Stop the program.

PROGRAM:
OUTPUT:
Experiment – 13
Objective: Write a program to add two complex numbers using binary operator overloading.
Algorithm:
Step 1: Start the program.
Step 2: Declare the class.
Step 3: Declare the variables and its member function.
Step 4: Using the function getvalue() to get the two numbers.
Step 5: Define the function operator +() to add two complex numbers.
Step 6: Define the function operator –()to subtract two complex numbers.
Step 7: Define the display function.
Step 8: Declare the class objects obj1,obj2 and result.
Step 9: Call the function getvalue using obj1 and obj2
Step 10: Calculate the value for the object result by calling the function operator + and operator -.
Step 11: Call the display function using obj1 and obj2 and result.
Step 12: Return the values.
Step 13: Stop the program.

PROGRAM:
OUTPUT:
Experiment – 14

Objective: Write a program to calculate the area of Circle, Rectangle and Triangle using function
overloading.
Algorithm:
STEP 1: Start the program.
STEP 2: Declare the class name as fn with data members and member functions.
STEP 3: Read the choice from the user.
STEP 4: Choice=1 then go to the step 5.
STEP 5: The function area () to find area of circle with one integer argument.
STEP 6: Choice=2 then go to the step 7.
STEP 7: The function area () to find area of rectangle with two integer argument.
STEP 8: Choice=3 then go to the step 9.
STEP 9: The function area () to find area of triangle with three arguments, two as Integer and one as
float.
STEP 10: Choice=4 then stop the program.

PROGRAM:
OUTPUT:
Experiment – 15

Objective: Write a program of Single Inheritance in C++.


Algorithm:
Step 1: Start the program.
Step 2: Declare the base class emp.
Step 3: Define and declare the function get() to get the employee details.
Step 4: Declare the derived class salary.
Step 5: Declare and define the function get1() to get the salary details.
Step 6: Define the function calculate() to find the net pay.
Step 7: Define the function display().
Step 8: Create the derived class object.
Step 9: Read the number of employees.
Step 10: Call the function get(),get1() and calculate() to each employees.
Step 11: Call the display().
Step 12: Stop the program.

PROGRAM:
OUTPUT:
Expected Viva-Voce Questions

Q1.What is computer?
Ans: A computer is a general purpose device that can be programmed to carry out a set of arithmetic or
logical operations. It is an electronic device in which we give some input, processing is done over that
data and we get some output.

Q2. What are data types?


Ans: While doing programming in any programming language, you need to use various variables to store
various information. Variables are nothing but reserved memory locations to store values. This means
that when you create a variable you reserve some space in memory.

Type Keyword

Character char

Integer int

Floating point float

Double floating point double

Q3. What is the size of integer?


Ans: The size of integer is 2 bytes.

Q4. Write an example of class?


Ans: Example, we defined the Box data type using the keyword class as follows:

class Box
{
public:
double length; // Length of a box
double breadth; // Breadth of a box
double height; // Height of a box
};
Q5. What is the difference between structure and union?
Ans:
STRUCTURE UNION
1.The keyword struct is used to define a structure 1. The keyword union is used to define a union.
2. When a variable is associated with a structure, the 2. When a variable is associated with a union,
compiler allocates the memory for each member. The the compiler allocates the memory by considering the
size of structure is greater than or equal to the sum size of the largest memory. So, size of union is equal to
of sizes of its members. The smaller members may end the size of largest member.
with unused slack bytes.
3. Each member within a structure is assigned unique 3. Memory allocated is shared by individual members
storage area of location. of union.
4. The address of each member will be in ascending 4. The address is same for all the members of a union.
order This indicates that memory for each member This indicates that every member begins at the same
will start at different offset values. offset value.
5 Altering the value of a member will not affect other 5. Altering the value of any of the member will alter
members of the structure. other member values.
6. Individual member can be accessed at a time 6. Only one member can be accessed at a time.
7. Several members of a structure can initialize at 7. Only the first member of a union can be initialized.
once.

Q6. What is an array?


An array is a systematic arrangement of objects, usually in rows and columns. The entire array
is stored contiguously in memory (that is, there are no gaps between elements).
Arrays can have more than one dimension. A two-dimensional array is called a matrix.
Q7. What is the difference between C and C++?

C C++

1. C is Procedural Language. 1. C++ is non Procedural i.e Object oriented Language.

2. No virtual Functions are present in C 2. The concept of virtual Functions are used in C++.

3. The concept of polymorphism is used in C++.


3. In C, Polymorphism is not possible.
Polymorphism is the most Important Feature of OOPS.

4. Operator overloading is one of the greatest Feature of


4. Operator overloading is not possible in C.
C++.

5. Top down approach is used in Program


5. Bottom up approach adopted in Program Design.
Design.

6. No namespace Feature is present in C 6. Namespace Feature is present in C++ for avoiding


Language. Name collision.

7. Multiple Declaration of global variables are


7. Multiple Declaration of global varioables are not allowed.
allowed.

8. In C 8. In C++
 scanf() Function used for Input.  Cin>> Function used for Input.
 printf() Function used for output.  Cout<< Function used for output.

Q8. Explain function in C++?


A function is a group of statements that together perform a task. Every C++ program has at least one
function, which is main().
The general form of a C++ function definition is as follows:
return_type function_name( parameter list )
{
body of the function
}
A C++ function definition consists of a function header and a function body. Here are all the parts of a
function:
Return Type: A function may return a value. The return_type is the data type of the value the function
returns. Some functions perform the desired operations without returning a value. In this case, the
return_type is the keyword void.
Function Name: This is the actual name of the function. The function name and the parameter list
together constitute the function signature.
Parameters: A parameter is like a placeholder. When a function is invoked, you pass a value to the
parameter. This value is referred to as actual parameter or argument. The parameter list refers to the
type, order, and number of the parameters of a function. Parameters are optional; that is, a function
may contain no parameters.
Function Body: The function body contains a collection of statements that define what the function
does.
Example:
Following is the source code for a function called max(). This function takes two parameters num1 and
num2 and returns the maximum between the two:

// function returning the max between two numbers


int max(int num1, int num2)
{
// local variable declaration
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}

Q9. Explain DDL, DML, SDL with example.


Database language is an important part of DBMS. It is used to access the required data from a database,
to modify the data of database and to design the structure of database.
Some Database Languages:
DML
DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert
and update data in database.
Examples: SELECT, UPDATE, and INSERT statements
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of
database objects in database.
Examples: CREATE, ALTER and DROP statements.

Q10. Explain the difference between the private, protected and public data members of a class.
Ans: A member (either data member or member function) declared in a private section of a class can
only be accessed by member functions and friends of that class
A member (either data member or member function) declared in a protected section of a class can only
be accessed by member functions and friends of that class, and by member functions and friends of
derived classes
A member (either data member or member function) declared in a public section of a class can be
accessed by anyone.
22. Can member functions be private?
Yes. Both member functions and member data can be private.
23. Can member data be public?
Although member data can be public, it is good programming practice to make it private and to provide
public accessor functions to the data.

11. What is the difference between interpreters and compilers?


Interpreters read through source code and translate a program, turning the programmer's code, or
program instructions, directly into actions. Compilers translate source code into an executable program
that can be run at a later time.

12. How do you compile the source code with your compiler?
Every compiler is different. Be sure to check the documentation that came with your compiler.
13. What is the difference between the compiler and the preprocessor?
Each time you run your compiler, the preprocessor runs first. It reads through your source code and
includes the files you've asked for, and performs other housekeeping chores.

14.. Why is the function main() special?


main() is called automatically, each time your program is executed.

15. What are the two types of comments, and how do they differ?
C++-style comments are two slashes (//), and they comment out any text until the end of the line. C-
style comments come in pairs (/* */), and everything between the matching pairs is commented out.
You must be careful to ensure you have matched pairs.

16. Can comments be longer than one line?


C-style comments can. If you want to extend C++-style comments to a second line, you must put another
set of double slashes (//).

17. What are the differences between the function prototype and the function definition?
The function prototype declares the function; the definition defines it. The prototype ends with a
semicolon; the definition need not. The declaration can include the keyword inline and default values
for the parameters; the definition cannot. The declaration need not include names for the parameters;
the definition must.

18. If a function doesn't return a value, how do you declare the function?
Declare the function to return void.

19. If you don't declare a return value, what type of return value is assumed?
Any function that does not explicitly declare a return type returns int.

20. What is a local variable?


A local variable is a variable passed into or declared within a block, typically a function. It is visible only
within the block.
21. What is scope?
Scope refers to the visibility and lifetime of local and global variables. Scope is usually established by a
set of braces.

22.What is function overloading?


Function overloading is the ability to write more than one function with the same name, distinguished
by the number or type of the parameters.

23. What is polymorphism?


Polymorphism is the ability to treat many objects of differing but related types without regard to their
differences. In C++, polymorphism is accomplished by using class derivation and virtual functions.

24. What does new return if there is insufficient memory to make your new object?
A null pointer (0).

25. What is the difference between passing by reference and passing a reference?
Passing by reference means not making a local copy. It can be accomplished by passing a reference or by
passing a pointer.

26. When you overload member functions, in what ways must they differ?
Overloaded member functions are functions in a class that share a name but differ
in the number or type of their parameters.

27. What is the difference between a declaration and a definition?


A definition sets aside memory, but a declaration does not. Almost all declarations are definitions; the
major exceptions are class declarations, function prototypes, and typedef statements.

28. When is the copy constructor called?


Whenever a temporary copy of an object is created. This happens every time an object is passed by
value.

29. When is the destructor called?


The destructor is called each time an object is destroyed, either because it goes out of scope or because
you call delete on a pointer pointing to it.

30. How does the copy constructor differ from the assignment operator (=)?
The assignment operator acts on an existing object; the copy constructor creates a new one.

31. How do you invoke a base member function from a derived class in which you've overridden that
function?
Base::FunctionName();

32. How do you invoke a base member function from a derived class in which you have not overridden
that function?
FunctionName();

33. Where must the declaration of a friend function appear?


Anywhere within the class declaration. It makes no difference whether you put the declaration within
the public:, protected:, or private: access areas.

34. What is the insertion operator and what does it do?


The insertion operator (<<) is a member operator of the ostream object and is usedfor writing to the
output device. 70. What is the extraction operator and what doesit do? The extraction operator (>>) is a
member operator of the istream object andis used for writing to your program's variables.

35. What is the return value of the insertion operator?


A reference to an iostream object.

36. What is a driver program?


A driver program is simply a function that is designed to exercise whatever objects and functions you are
currently programming.

37. What is encapsulation?


Encapsulation refers to the (desirable) trait of bringing together in one class all the data and
functionality of one discrete entity.

38.What is object orientation?


It is a technique for system modeling. It offers a number of concepts

Вам также может понравиться