21

Click here to load reader

B.sc(it)

Embed Size (px)

DESCRIPTION

Practical

Citation preview

Page 1: B.sc(it)

Solution of KU BSIT-62 Solution of KU BSIT-61 Solution of KU BSIT-63 Solution of KU BSIT-64 Solution of KU BSIT-51 Solution of KU BSIT-52 Solution of KU BSIT-53 Solution of KU BSIT-54 Solution of KU BSIT-44 KU B.Sc.(IT) 6th sem 2013 Practical FULL SET KU B.Sc.(IT) 5th sem 2013 Practical FULL SET KU B.Sc.(IT) 4th sem 2013 Practical FULL SET Solution of KU BSIT-51

B.Sc(IT) 5th sem Practical question paper with answer...

Set -1

1. Open a Image. And separate background using selection tool.

Ans-

1. Open an image.2. Click on the lasso tool from the lasso tool selection of the toolbar.3. Click on the edges of the image & go to on clicking on the edges of the image till

the whole image is separated from the background.4. They Copy or cut the selected region.

 

 2. Write a JSP page to display the number of hits to this page. (Hint: use application  scope of java bean).Ans-<HTML><HEAD>

Page 2: B.sc(it)

<TITLE>Hit Counter</TITLE></HEAD><BODY><%!int ctr=0;%><%ctr++;Integer ctro=new Integer(ctr);ServletContext sc=getServletContext();sc.setAttribute("count",ctro);out.println("Number of times page has been hitted is "+ctro.toString());%></BODY></HTML>

--------------------------------------

Set -21.  Using pencil tool create an image of landscape, and color it with Brush tool.Ans:-

1. Select the pencil tool from the toolbar.2. Draw a image of landscape.3. Select the brush tool from the toolbar.4. Select the type of brush from the brush presets.5. Apply the brush tool to the derived region.

2. Create an HTML page containing the following featuresa. Create a  login JSP page with username , password and submit button. b. On submit, display message ‘Thank you for logging in ’ Also create cookies to store username and password.c. Open login JSP page on a new browser. If the cookie is present the username and password field  should be automatically populated with the values from the cookies.Ans-(A)<HTML><HEAD><TITLE>User Page</TITLE></HEAD><BODY><center><h3> Login Page </h3><hr color='blue' size=5><%String cookieName1 = "u";String cookieName2 = "p";Cookie cookies [] = request.getCookies ();Cookie myCookie = null;if (null!=cookies){

Page 3: B.sc(it)

for (int i = 0; i < cookies.length; i++) {i(cookies[i].getName().equals (cookieName1)||cookies[i].getName().equals(cookieName2)){myCookie = cookies[i];break;}}}%><form action="Q9b.jsp"><pre><table><tr><td>UserName : </td><td><input name="uname" value=<%=myCookie.getValue()%>></td></tr>  <tr><td>Password :</td><td><input name="pwd" value=<%=myCookie.getValue()%>></td></tr><tr><td><input value="Submit"></td><td><input value="Clear"></td></tr></table></center></pre></BODY></HTML>-----------------------------------------(B)<HTML><HEAD><TITLE>Thank You For Login</TITLE></HEAD><BODY><h3>Thank you for logging in</h3><%String u=request.getParameter("uname");String p=request.getParameter("pwd");Cookie uc=new Cookie("u",u);Cookie up=new Cookie("p",p);response.addCookie(uc);

Page 4: B.sc(it)

response.addCookie(up);uc.setMaxAge(365*24*60*60);up.setMaxAge(365*24*60*60);out.println("Cookie Saved");%></BODY></HTML>----------------------------------------------------

Set -31.  Write a JSP program to display current date and time and suitable welcome message. §  If time is between 5AM and 12 PM display welcome message as ‘Good Morning’§  If time is between 12 PM and 5 PM display welcome message as ‘Good Afternoon’§  After 5PM display message as ‘Good evening’.Ans- <%@page content pageEncoding="UTF-8" import="java.util.Calendar" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <title>JSP Page</title>    </head>    <body>        <h1>Hello World!</h1>        <%        Calendar cal = Calendar.getInstance();        int hh = cal.get( Calendar.HOUR_OF_DAY );        String message = "";        if( hh < 12 )        {        message = "Good Morning!";        }        else if( hh == 12 )        {        message = "Good Noon!";        }        else if( hh > 12 && hh < 18 )        {        message = "Good Afternoon!";        }        else if( hh > 18 && hh < 21 )        {        message = "Good Evening!";        }        else        {        message = "Good Night!";        }

Page 5: B.sc(it)

        %>----------------------------------------------------

2. Using Rubberstamp tool, create a creative image. The opacity of image should be in 50%. Tips: ALT + CLICK to define source.Ans-

1. Open an image.2. Select the rubber stamp tool.3. Select the opacity as 50% from the option bar.4. Press alt + click on the  region to be  cloned to get the source.5. Release the alt key.6. Drag the mouse where you want to clone the image. 

----------------------------------------------------------- 

Set - 4

1. Using Gradient tool, create some backgrounds for photos. Ans-

1. Open a blank document.2. Select the gradient from the toolbar.3. Double Click on the gradient color scheme from the tool bar. A gradient editor

will come. Select the color as per your requirement.4. Select the type of gradient to be applied from the option bar. Type may be radial,

linear, angle, reflected, diamond.5. Drag the mouse from one side to another or from left to right or right to left or

top to bottom or bottom to top as per your requirement.6. You can get the gradient as per your choices.7. Paste the photos on gradient background.

2. Create an HTML page containing the following featuresA. A combo box containing the list of  7 colors: Violet, Indigo, Blue, Green, Yellow, Orange, RedB. Depending upon the color selected from the above combo box, the message in the status bar of the window must be reflect the value selected in the combo box (hint: on change event of the combo box).Ans- <html><head><title>  Combo Box Event</title><h1 align="center">Combo Box Event </h1><script language="JavaScript">

Page 6: B.sc(it)

    function fnChanged(color1)    {                 window.status="You have choosed "+color1 +" !!!";    }</script></head><body><form name="frmME"><select name=ComboName size=1 onChange="fnChanged(ComboName.value);">    <option value="" SELECTED>Choose One     <option value="Violet">Violet    <option value="Indigo">Indigo    <option value="Blue">Blue    <option value="Green">Green    <option value="Yellow">Yellow    <option value="Orange">Orange    <option value="Red">Red  </select></form></body><html> 

-----------------------------------------------------------------Set - 51. Create an HTML page containing the following features A.  A combo box containing the list of  7 colors: Violet, Indigo, Blue, Green, Yellow, Orange, RedB.  An empty 1X1 table with default background color: WhiteC.  Depending upon the color selected from the above combo box, the background of the table must be changed accordingly. (hint: on change event of the combo box). Ans-<html><head><title>  Combo Box Event</title><h1 align="center">Combo Box Event </h1><script language="JavaScript">    function fnChanged(color1)    {                 tbl.BGCOLOR=color1;          document.getElementById("tbl").style.backgroundColor = color1;     }</script></head><body><table id="tbl" height="100" width="100" border="2" align="Center"><tr><td></td>

Page 7: B.sc(it)

</tr></table><br><form name="frmME"><p>Choose a Color:<select name=ComboName size=1 onChange="fnChanged(ComboName.value);">    <option value="" SELECTED>Choose One<option value="Violet">Violet    <option value="Indigo">Indigo    <option value="Blue">Blue    <option value="Green">Green    <option value="Yellow">Yellow    <option value="Orange">Orange    <option value="Red">Red  </select></form></body><html>

------------------

2. Import a  ‘ JPEG’ format image and save it as a ‘PSD’ image, using  layer optionsDecrease the opacity of image.Tips: Ctrl + Shift + S   = ‘save as’ windowAns:-Ans-

1. Start Photoshop2. Click file menu Place.3. A place dialog box appears.4. Select a ‘.JEPG’ image & Click on Ok.5. Set the image as per the Size of the document.6. Press Enter.7. Select the image layer from the layer window & decrease the opacity.8. Save the file in File menu.9. Select file type as .psd & name the file.

--------------------------------------------------------------

Set-61.    Open a PORTRAIT image, convert it into grayscale. Now color the image Using  COLOR BALANCE, LEVELS and CURVESAns.-

1. Open an image.2. Click image menu mode Grayscale//one message apper, Image adjustment black

& White(press discard button).3. Select image adjustment  color balance, Levels & Curves.4. Adjust te color balance, levels & curves as per your choices.

Page 8: B.sc(it)

 ---------------------------2. Write a HTML page containing an HTML form to capture the following properties from the user:A. Name (text box)B. Address (text area)C.Phone (text box)Write java script functions * to validate Name to contain only alphabets and of maximum length should be 25 ; Show appropriate messages on failure *to validate Address field to contain maximum length of 200 characters; Show appropriate on failure and focus the ‘Address’ field text area* to validate phone number to contain only numeric data; show appropriate messages on failure

Ans-<html><head>    <title>Validation Page !!! </title><h1 align="center">Please Enter Your Details </h1><script language="javascript">    function Validate()    {     var Name=frm.name.value;    var Address=frm.address.value;    var phoneNo=frm.poneno.value;             if(Name=="" || Address=="" || phoneNo=="")          {           alert("All Field Are Must Be fill.");           name.focus();          }        if(Name.length>=25)            {               alert("Name cannot be more than 25 characters");               name.focus();             }           if(Address.length>200)             {             alert("Address cannot be more than 200 characters");             address.focus();             } for(var i=0;i<phoneNo.length;i++)             {             var no=phoneNo.charAt[i]              if(no > "0" || no < "9")              {                 alert("phone number Field contain only numeric data");                 poneno.focus();               }            }                  

Page 9: B.sc(it)

    }</script></head><body><form id ="frm">    <table "width: 511px">        <tr>            <td>            </td>            <td align="center">                User Name</td>            <td align="center">           <input id="name" maxlength="100" size="" /></td>            <td>            </td>        </tr>        <tr>            <td>            </td>            <td align="center">                Address</td>            <td align="center">                <textarea id="address" cols="20" rows="2"></textarea></td>            <td>            </td>        </tr>        <tr>           <td>            </td>            <td align="center">                Phone No</td>            <td align="center">                <input id="poneno" /></td>            <td>            </td>        </tr>        <tr>            <td></td>            <td align="center" colspan="2">                <input id="Submit1" value="submit" onclick ="Validate();"/></td>            <td>            </td>        </tr>    </table></form> </body></html>--------------------------------------------------------------

Page 10: B.sc(it)

Set-7

1. Create two HTML pages a.First page with the following features  i.    An image(logo) with a company name as the heading in the top center  ii.    This page containing an HTML form, two text boxes to get First Name, Second Name of the user  iii.    A submit button to the submit the data to the next pageb. The Second page receives the data submitted by the First Page, displays the following message   Welcome <Last Name>, <First Name>

Ans-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" ><head>    <title>First Page</title>    <script language ="javascript">    function validate()    {    var v1,v2;    v1=form1.textbox1.value;    v2=form1.textbox2.value;    if(v1==0)    {    alert("first name Cannot be left blank");    }    else if(v2==0)    {    alert("Last Name cannot be left Balnk");    }else     {    window.open("b.html",'parent').document.write("Welcome "+v2+" , " +v1);    }        }    </script></head><body><form id="form1"><center><img src="logo.gif" /><br /><br /><br /><center><table><tr>

Page 11: B.sc(it)

<td>first name</td> <td><input type ="text" name ="textbox1" /></td></tr> <tr><td>last nae</td><td><input type ="text" name ="textbox2" /></td></tr><tr><td></td><td align ="left"><input type ="button" name ="button" value="Submit" onclick="validate()" /></td></tr></table></center></center></form></body></html>-------------------------- 2. Open a portrait, select the eyeballs using marquee tool, and now change the color of eyes using Hue / saturation.Tips: Ctrl + U = Hue / saturationAns-

1. Open a portrait image.2. Select the elliptical marquee tool.3. Select the eyeballs.4. Image menu adjustment hue/saturation.5. Adjust the hue & saturation according to your choice.6. Click OK.

------------------------------------------------------------------------------

Set-8

1. Open 3 to 4 images in a same layer. Using filter effects create creative   backgrounds for book cover page. Ans-

1. Go  to File Menu and Click Open File and open 3 to 4 image in same layer.

2. To apply a filter to an area of a layer, select that area. To apply a filter to the entire layer, leave the image unselected.

3. Choose a filter from the sub menus in the Filter menu. If a filter name has ellipses, a dialog box appears.

4. If a dialog box appears, enter values or select options.5. The effect using the filters preview box, use the following navigation

methods.6. Drag in the image window to center a specific area of the image in the

preview box.7. To see part of the layer that is not visible, move the cursor inside the

preview box to activate the hand tool. Drag to move the layer preview.8. Use the + or - button under the preview box to zoom in or zoom out on the

preview.

Page 12: B.sc(it)

9. If the Preview option is available, select the option to preview the filter effect on the image.

10. Click OK to apply the filter.

 

2. Create a HTML page to display a list of film songs available in the library. The following are features of the page

A. The name of the songs must be hyper linked to the songs, so that the users must be able to download songs.B.The following is the song database available in the library:Library Name: Hariharan Music Site

Ans-<html><body><pre>Library Name: Hariharan Music Store</pre><table border="1"><tr><th>Sl. No.</th><th>Song Name</th><th>Film</th><th>Artiste</th></tr> <tr><td>1</td> <td><a href="e:\songs\01.mp3">PATA-PATA</a></td><td>Apthamitra</td><td>Udith Narayan</td></tr><tr><td>2</td><td><a href="e:\songs\01.mp3">Kana Kanade</a></td><td>Apthamitra</td><td>Madhubalakrishna</td></tr><tr><td>3</td><td><a href="e:\songs\01.mp3">Anku Donku</a></td><td>Apthamitra</td><td>S P Balasubramanyam</td></tr><tr><td>4</td><td><a href="e:\songs\01.mp3">Kalavanu Thadeyoru</a></td><td>Apthamitra</td><td>Hariharan</td></tr><tr>

Page 13: B.sc(it)

<td>5</td><td><a href="e:\songs\01.mp3">Bombe</a></td><td>Anayya</td><td>Unknown</td></tr></table>  </body></html>----------------------------------------------------

Set-9

1. Create an HTML page to display the following data using <table></table> tags First Name     Last Name      City                Phone Number         

shiva                Rama           Mysore              08212569964 

Pratap              S                  Bangalore          08025689754 

Sreenivas        G                  Mercara            08965445454 

 Ans-<html><body><table><tr>    <th>First Name</th>     <th>Last Name</th>     <th>City</th>     <th>Phone Number</th></tr><tr> <td>shiva</td><td>Rama</td><td>Mysore</td>

<td>  08212569964 </td></tr><tr><td>Pratap</td><td>S</td><td>Bangalore</td>

<td>  08025689754 </td></tr><tr><td>Sreenivas</td><td>G</td><td>Mercara</td><td>089655445454</td>

Page 14: B.sc(it)

</tr></table></body></html>-------------------------------

2. Open a image and adjust a level of image. Tips: Ctl + L = levelAns-Open an image.

1. Go to Image menu adjustment levels.2. Adjust the level according to your choice.3. Click on OK.

------------------------------------------------------------------------------Set-10

1. Write HTML script to display “Hello World, Welcome to the world of HTML”. Put the title as “World of HTML.Ans- <html><head><title>World of HTML</title></head><body>Hello World,<b>Welcome to the World of HTML</b></body></html ----------------------------------

2. Change a image size 22 cm x 29 cm to 44 cm x 58 cm.  And resolution 72 to 300.Ans:-

1. Open an image.2. Go to image menu image size. 3. Set the image size to 44cm & 58cm.4. Set the resolution to 300.5. Click OK.

-----------------------------------------------------------------------------------

Set-111. Create some geometrical shapes, using shape tool.  1.8 square shape  2.octagon  3. Aim   4.Telephone

Page 15: B.sc(it)

Ans:-For figure 1 (8 square shape):-

1. Select the polygon tool from the toolbar.2. Make the sides to 4 in the option bar.3. Drag the mouse to create the shape.4. Repeat the steps to create more shapes like this.

For Figur 2(octagon) :-

1. Select the polygon tool from the toolbar.2. Make the sides to 8 in the option bar.3. Drag the mouse to create the shapes.

For figure 3 ( Aim) :-

1. Select the ellipse tool.2. Draw a small circle & fill the color.3. Draw another circle outer to the small one.4. Select the line tool.5. Draw the line horizontal & vertical cross over the circle.

For figure 4 (Telephone) :-

1. Select the polygon tool.2. Make the sides to 6 in the option bar.3. Draw the shapes.4. Select the pen tool.5. Using pen tool draw the shape as per your choice.

------------------------------------------------------------------------------------

Set-12

1. Type text ‘GRADATION’ and apply gradient tool on text.Tips: Before applying gradient you must select text with wand too, and apply gradient on new layerAns-

1. Open The New window.2. Select the part of the image you want to fill. If you do not make a selection the

gradient fill is applied to the entire active layer.3. Double-click the gradient tool in the toolbox to display its Options palette.4. Choose a mode.5. Drag the slider to set the opacity.6. If you want to turn off the transparency mask for the gradient fill, deselect

Mask.7. If you want to create a smoother blend with less banding, select Dither.

Page 16: B.sc(it)

8. For Type, choose one of the following options.9. Select a gradient fill horn the list.10. Position the pointer in the image where uou want to set the starting point of the

gradient, and drag to define the length and direction of a linear fill or to define the radius of a radial fill. To constrain the line angle to a multiple of 45», hold down Shift as you drag.

11. Release the mouse button where you want to set the ending point of the gradient.

----------------------------

2. Create an HTML page to display the following data using <table></table> tags

First Name   Last Name      City           Phone Number         

Shiva               Rama        Mysore           08212569964 

Pratap             S             Bangalore        08025689754 

Sreenivas        G              Mercara            08965445454 

Ans-<html><body><table><tr><th>First Name</th>  <th>Last Name</th>  <th>City</th><th>Phone Number</th></tr><tr><td>shiva</td><td>Rama</td><td>Mysore</td>

<td>  08212569964 </td></tr><tr><td>Pratap</td><td>S</td><td>Bangalore</td>

<td>  08025689754 </td></tr><tr><td>Sreenivas</td><td>G</td><td>Mercara</td>

Page 17: B.sc(it)

<td>089655445454</td></tr></table></body></html>

-------------------(END)------------------

-:Best Of Luck:-