Likes

Gniit SEM A MT2 Dumps C#


  1. You are creating a Windows-based application that takes age from the user. The application should convert the age from character data type to integer data type. Which of the following functions you need to use to accomplish the desired task?
 1, Convert.ToInt32
2, convert.ToInt32
3, Parse.ToInt32
4, Convert.ToInt

  • 2.The _______ model is based on a real world perception that comprises a collection of objects or entities and the relationships among these.
1, ER
2, Network
3, Hierarchical
4, Relational
3.The ABC University used to offer a course in Visual Basic. However, due to less demand of the subject, the university dropped the course from its IT curriculum. This resulted in modification of the complete IT curriculum. Identify the type of entity that the Visual Basic course is.
1, Independent entity
2, Dependent entity
3, Weak entity
4, Subentity
4. A computer institute offers courses on various programming languages for students. The students can select any number of offered courses. Which type of relationship exists between the students and offered courses?
1, One-to-Many Relationship
2, Many-to-One relationship
3, Many-to-Many Relationship
4, One-to-One relationship
5. Sam is accessing a table that contains details of all the employees of his organization. He needs to retrieve the details of those employees who have more than $10000 salary per month. He has decided to use the PRODUCT relational operator to accomplish this task. However, his manager has informed him that the use of this relational operator will not give the desired result. Analyze the situation and provide the operator that Sam should use.
1, PROJECT
2, UNION
3, DIVIDE
4, RESTRICT
6. Smith works as a Manager in TechnoWorld, Inc. He manages and evaluates the performance of his team. Identify the entities and relationship in the given scenario.
1, Entities: Smith, team
Relationship: manage
2, Entities: Smith
Relationship: manage and evaluate
3, Entities: Smith, team
Relationship: evaluate
4, Entities: Smith,        team        Relationship: manage and evaluate
7. Identify the type of relationship in the following sentence: Software engineers can work on various programming languages.
1, One-to-One Relationship
2, Many-to-One Relationship
3, One-to-Many Relationship
4, Many-to-Many Relationship
8. There are _______ types of relationships that exist between entities.
1, one
2, two
        3, three   
4, four
9. Peter is working as a Senior Software Engineer in NewSol, Inc. His Employee ID is N0065. He joined the organization on 19 Aug, 2008. Identify the attributes of the entity instance.
1, Date of joining(19 Aug, 2008), Employee_ID(N0065), and Designation(Senior Software Engineer).
2, Employee_ID(N0065) and Designation(Senior Software Engineer).
3, Date of joining(19 Aug, 2008) and  Employee_ID(N0065)
4, Employee_ID (N0065)
10. Peter has been given a task to simplify a database structure. He has to represent the data and the relationships among them in the form of rows and columns. He has decided to use the Network model for completing this task. However, his manager has informed him that the use of this model will not generate the desired result. Analyze the situation and provide the correct model that Peter should use.
1, Hierarchical model
2, Conceptual model
                 3, Relational model
4, ER Model
11. Sam is working on two tables, Employee Details and Department Details. The Employee Details table contains employee ID, employee name, department ID, and designation of all employees. The  Department Details table contains department ID and department names. Sam has to retrieve the name of the department that has the maximum number of employees working. Which operator should Sam select for the given scenario?
1, Join
2, Intersect
3, Union
4, Product
12. Subtypes are connected to the supertype by a relationship known as _________.
1, one-to-one
2, one-to-many
3, many-to-many
 4, unnamed
13. __________ is a scientific method of breaking down complex table structures into simple table structures by using certain rules.
1, Normalization
2, Renormalization
3, Functional Dependency
4, Specialization
14. When each cell of the table contains precisely one value, the table is said to be in the ______ normal form.
1, first
2, second
3, third
4, Boyce-Codd
15. Jim works as a database administrator in TechnoSol, Inc. He has a table that contains details of employees and location of the meetings they have attended in the last one year. Jim has to normalize the table. The table columns consist the details of Employee ID, Department ID, meeting date, and location of the meeting. On analyzing the table he found that meeting date and location of the meeting columns consist of more than one value in each cell. Jim has decided to normalize the table by using second normal form. However, his manager has informed him that using second normal form for the given scenario will not be correct. Analyze the situation and provide the normal form that Jim should use.
1, BCNF             2, First normal form         3, Second normal form       4, Third normal form
16. A table lists the details of all the students studying in an institute. Identify the determinant among the four columns of the given table. Click the Exhibit button to view the table.
1, Student Name       2, Student Roll Number         3, Student Address       4, Student Fathers’ Name
17. Which of the following sentences is CORRECT about second normal form?
1, A table is said to be in second normal form if Boyce-Codd normal form is applied to it.
2, A table is said to be in second normal form when every attribute in a row is not functionally dependent on any particular key.
3,A table is said to be in second normal form, when every attribute in a row is dependent on just part of the whole key.
          4, A table is said to be in second normal form, when every attribute in a row is functionally dependent upon the whole key, and not just part of the key.
18. A table is said to be in _____ normal form when it is in second normal form and every non-key attribute is functionally dependent only on the primary key.
1, first      2,fourth           3, third           4, Boyce-Codd
19. Which of the following processes can increase disk space utilization?
1, Normalization        2, Denormalization  3,Generalization     4, Specialization
20. Stella is working on a table that contains the details of students who have appeared for different course exams. She has to normalize the table. The primary key of the given table is Roll Number + Exam Code. On analyzing, Stella found that any modification in Student Name column will lead to modification in the whole table and Student Name + Exam Code can also be chosen as the primary key. To avoid this redundancy, which normal form should Stella select? Click the Exhibit button to view the table.
1, 1NF     2, 2NF      3, 3NF        4, BCNF
21. Jim is working on an ER diagram. He has been instructed by his manager to map the given ER diagram to its corresponding tables. On analyzing the whole ER diagram, he is planning to create a table called Account Details. However, his colleague has advice him that creating only one table will not give the desired result. Analyze the given ER diagram and provide the tables that Jim should create.
1, Account Details  and Saving Account Details
2, Account Details , Current Account Details ,and Saving Account Details
3, Salary Account Details , Current Account Details ,and Saving Account Details
4, Account Details, Salary Account Details , Current Account Details ,and Saving Account Details
22. The _________ operator builds a relation from tuples appearing in either or both of the specified relations.
1, Project         2, Divide         3, Join         4, Union
23. The ________ model represents all data in a database as simple tables in the row-column format.
1, Relational           2, Hierarchical         3, Network         4, ER
24. Replacing optional attributes with subentities is called __________.
1, denormalization         2, normalization         3, generalization         4, specialization
25. Which of the following sentences is NOT correct about normalization?
3, There should be atleast one column that accepts a NULL value.
26. Which of the following sentences is NOT true about an attribute?
4, It cannot refer to another entity.
27. The Employee_Details table lists the details of an employee. If Employee ID is the primary key, identify the alternate key in the table?
  1. Click the Exhibit button to view the table.
2, Designation Code
28. In the database structure, a table is called by which of the following name?
3, Relation
29. Jack is working on a table that describes salary details of an employee. Which of the columns in the table will you use to uniquely identify all the rows of the table? Click the Exhibit button to view the table.
1, Employee ID +Account Number
30. Ryan is working on a table containing details of projects that the students have submitted after completing a course on a specific programming language.
31. The primary key in the table is Student ID + Project Code. Ryan is thinking of applying third normal form to simplify the table structure. On discussing with his senior, he found that his decision of selecting the third normal form is not correct. Analyze the given table and identify which normal form should Ryan select.
Click the Exhibit button to view the table.
2, Second Normal Form
32. John is working on a table that includes the details of employees and their departments. He has to normalize that table. The primary key of that table is Employee ID. Which normal form should he choose to simplify the table? Click the Exhibit button to view the table.
3, 3NF
33. Which of the following commands is used to initiate a chat session in Linux?
2, talk
34. Joe is communicating with Jack by using the Chat utility of Linux. Now, he wants to end the chat session. Which of the following commands would help him do so?
1, Ctrl + C keys
35. Kim has logged on to the Linux system. She received a query from the customer. To resolve the query, she has to communicate with the back office. Identify the correct sequence of steps that she needs to follow to communicate with the back office.
1, 1. Identify the user with whom she needs to communicate.
2. Check whether the user is online and ready to receive messages.
3. Identify the mechanism for communication.
4. Identify the contents of the message.
36. Joe is working on a Linux system. He has to chat with Angela. He first wants to check whether Angela is online and ready to receive messages. For this, he types the following command at the shell prompt and presses the Enter key:
  1. who
    However, the preceding command displays the list of currently logged on users. This list does not indicate whether the user is ready to receive messages. Identify the correct command that Joe should use to accomplish the required task?
2, who -T
37.  Which of the following options is NOT an example of Mail User Agent (MUA)?
4, sendmail
38. Which of the following statements is a function of Mail User Agent (MUA)?
4, MUA is used to read the message at the recipient’s end.
39. Jack is working on his Linux system. His boss has sent him a mail that lists the tasks to be performed by Jack. Jack has to access his inbox to read the new mails received on his Linux system. Identify the correct sequence of steps that Jack needs to follow to read the new mails.
3, 1. Type pine at the shell prompt, and press Enter.
2. Press L.
3. Select the relevant mail by using the up and down-arrow keys.
4. Press Enter.
40. Julia is logged on to the Linux system. She has to access her Inbox to read mails. She invoked the pine MUA and pressed the S key to display the list of folders. Analyze whether Julia has pressed the correct key to display the list of folders. If not, provide the correct solution.
2, No, Julia needs to press the L key.
41. Which of the following options do you need to press on the main menu of pine to configure the pine options?
1, S
42. You have sent a mail by using the pine utility of Linux. Now, you need to verify whether the mail has been sent or not. How will you perform this task?
3, By checking the contents of the sent-mail folder.
43. You have sent an E-mail to your friend by using the pine utility of Linux. After you have sent the mail, its copy is saved automatically in the sent-mail folder. Now, you need to verify this by checking the content of the sent-mail folder. Which of the following sequence of steps do you follow to perform this task?
1, 1. Press the M key.
2. Select the Folders List option, and press Enter.
3. Select the sent-mail option from the Folders List by using the Tab key, and press Enter.
44. You have a Linux system. You have to send an E-mail to your friend. For this, you performed the followed steps:
  1. 1. Type pine at the shell prompt, and press Enter.
    2. Press C.
    3. Type the name of the recipient in the To: block, and press Enter.
    4. Type the subject in the Subject: block, and press Enter.
    5. Type the contents of the mail.
    6. Press the Ctrl and C keys to send the e-mail.However, you are not able to send the e-mail by using the preceding steps. Identify the problem and provide the correct solution.
4, At step 6, the Ctrl and X keys should be pressed to send the E-mail.
45. Which of the following statements is NOT the correct file naming guideline of the Linux operating system?
2, A file name can have maximum of 286 characters.
46. Which of the following options do you need to press to switch to the Insert mode and then type the contents at the current cursor position of the vi editor?
1, i
47. Which of the following commands can be used to replace a character at the current cursor position and switch back to the Command mode?
4, r
48. You have written a file by using the vi editor. Now, you need to save the file by the name myfile.txt. Which of the following steps do you need to follow to save the file and close the vi editor?
1, 1. Press the Esc key.
2. Type :w /home/Complaints/myfile.txt, and press Enter.
3. Type :q, and press Enter.
49. You have opened a file in the vi editor. You have to make some changes in the third line of the file. The cursor is currently at the end of the second line. To make changes in the third line, you pressed the k command. However, the cursor moved to the first line instead of the third line. Analyze the situation and provide the correct command that should have been used to move the cursor from the second to the third line.
1, You need to press the j command to move to the third line.
50. You have to view the files stored in the /home/bill directory. You are currently in the bill directory. Which of the following commands would you use for this purpose?
1, ls
51. There are three files in the /home/math directory. The file names are math001.2009, math002.2009, and math003.2009. You need to copy all the files in the /home/math directory to the /home/backup directory. You are currently in the math directory. Which of the following commands would you use to perform this task?
4, cp /home/math/math00[1-3].2009 /home/backup
52. There is a file named myfile001.txt in the /home/mydir directory. You need to rename the file to myfile002.txt. You are currently in the mydir directory. For this, you typed the following command at the shell prompt:
  1. rm /home/mydir/myfile001.txt /home/mydir/myfile002.txt
    Analyze and predict whether the preceding command is able to accomplish the required task. If not, predict the correct command.
2, No, the correct command is:
mv /home/mydir/myfile001.txt /home/mydir/myfile002.txt
53. ABC Bank is offering personal loans to its customers at reduced interest rates. This offer is valid for only a limited period. The bank intends to use a software application to record all loan details. The bank wants that once the offer period ends, the interest rates and other details such as loan limits are changed to the original values. The bank does not want to modify the complete software application as a result of change in such loan details. Identify the tier on which the bank should place such details in order to accomplish their requirement.
3, Business tier

Aptitude Questions

(Datatypes C#)




1. 
Which of the following statements are correct about data types?

1.            If the integer literal exceeds the range of byte, a compilation error will occur.
2.            We cannot implicitly convert non-literal numeric types of larger storage size                  to byte.
3.            Byte cannot be implicitly converted to float.
4.            A char can be implicitly converted to only int data type.
5.            We can cast the integral character codes.
A.
1, 3, 5
B.
2, 4
C.
3, 5
D.
1, 2, 5   

2. 
Which of the following is an 8-byte Integer?
A.
Char
B.
Long
C.
Short
D.
Byte
E.
Integer          

4. 
Which of the following statements is correct?
A.
Information is never lost during narrowing conversions.
B.
The CInteger() function can be used to convert a Single to an Integer.
C.
Widening conversions take place automatically.
D.
Assigning an Integer to an Object type is known as Unboxing.
E.
3.14 can be treated as Decimal by using it in the form 3.14F.

5. 
Which of the following are value types?
1.            Integer
2.            Array
3.            Single
4.            String
5.            Long
A.
1, 2, 5
B.
1, 3, 5
C.
2, 4
D.
3, 5

6. 
Which of the following does not store a sign?
A.
Short
B.
Integer
C.
Long
D.
Byte
E.
Single

7. What is the size of a Decimal?
A.
4 byte
B.
8 byte
C.
16 byte
D.
32 byte

8. 
Which of the following is the correct size of a Decimal datatype?
A.
8 Bytes
B.
4 Bytes
C.
10 Bytes
D.
16 Bytes
E.
None of the above.



(Networking)


1. 
How long is an IPv6 address?
A.
32 bits
B.
128 bytes
C.
64 bits
D.
128 bits


2. 
What flavor of Network Address Translation can be used to have one IP address allow many users to connect to the global Internet?
A.
NAT
B.
Static
C.
Dynamic
D.
PAT

3. 
What are the two main types of access control lists (ACLs)?
1.            Standard
2.            IEEE
3.            Extended
4.            Specialized
A.
1 and 3
B.
2 and 4
C.
3 and 4
D.
1 and 2


HTML TUTORIAL PDF DOWNLOAD

JAVA TUTORIAL PDF DOWNLOAD

BookHive Corp. Project Sem 4

BookHive Corp. 
Project Sem 4

Bookhive Corp. is a leading publishing house in the US. The company headquarter is located in Atlanta. It has been publishing books, articles, journals, novels, magazines, and encyclopedias for the past fifteen years. The customers of the company include students, IT professionals, and research scholars. The company enjoys a dominant position in the publishing business with 15 retail stores in all major cities in the US.
The Current System
At present, Bookhive sells books only through its retail stores, which limits the company's consumer base. Each store has a Store Manager, who is responsible for managing the operations of a store.
Presently, the company depends on the print and electronic media to advertise its books. There is a static website that is periodically updated whenever a new book is released. Many competitors of the company already have their e-commerce stores and are selling books online. Bookhive is losing its customers to competitors because people prefer buying books online, without having to visit a retail store. Customers often complain that due to an inadequate number of stores in their city, they have to travel a long distance to reach a store. In addition, customers visiting a store complain that, at times, the books that they are looking for are not available in the stores.
Hence, many orders remain unplaced and customers are dissatisfied. As a result, there has been a loss in the company's revenue.
The Envisioned System
It is evident that the existing business model is insufficient to meet customer demands.
To address the current limitations, the management has tied up with a software development organization. The management has instructed the organization to create an online book store application that can be globally used to order books. In the first phase, the Bookhive application will simplify the process of managing stocks and enable the organization to sell books online. The application should provide a consistent mechanism to enable customers to buy books online and administrators to manage book stocks online. Currently, the management wants that all orders should be processed at a centralized location and delivered through the relevant store. Later, each store will have its own interface through which it will be able to manage the orders pertaining to that store.
To provide the envisioned functionalities, the Bookhive application should have the following features during the first phase of its development:
  • The application should be accessible over the Internet.
  • The application should be accessible to the customer and the administrator. The customer role should be applicable to any user accessing the application to order books online.
  • The system should allow a customer to perform the following activities:
    • Browse through book categories.
    • View details of a book.
    • Add and remove books from a shopping basket while browsing the categories.
    • Place an order of books by providing delivery information.
  • The system should have an authentication mechanism to verify the credentials of a Bookhive employee assigned with the administrator role.
  • The system should have an authorization mechanism to restrict access to administrative functions based on the fact whether the current user is an administrator or not.
  • The system should allow an administrator to perform the following activities:
    • View details of books.
    • Add new books to the book catalogue.
    • Delete books from the book catalogue.
    • Update book information, such as book category, availability, and price.
    • View status of orders placed by customers.
    • Update the status of an order once the order is delivered.
  • The system should have a mechanism, where a store can provide festive discounts on specific books by providing the discount information in an XML file.
To fulfill the preceding requirements, the following specifications have been laid down to design the Bookhive application:
  • Application should be developed in ASP.NET MVC.
  • Design, layout, and navigation of the application should be uniform across all Web pages.
  • Book ordering activities should be tracked across a user's session through a shopping cart.
  • Order details of a customer should be persisted in a database.
  • User authentication should be form-based.
  • User authorization should be role-based.
  • Data provided by the user must be validated.
  • Festive discounts on online orders should be easily configured through an XML file.
  • Static views of the application should be cached.
  • Application should provide information on the company's profile and its contact details.





As an ASP.NET developer, you have been assigned the task to create the Bookhive application.

Download link 



BSC-IT 5TH SEMESTER PRACTICAL SOLUTIONS




Set 1

//1. Open an Image. And separate background using selection tool.
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select image ->click open
Step 4: click on magic wand tool from tool menu
Step 5: select on background of the image using magic wand tool
Step 6: press delete on keyboard
Step 7: go to file menu -> save as
Step 8: select JPEG format
Step 9: enter file name -> click SAVE//2. Write a JSP page to display the number of hits to this page. (Hint: use application scope of java bean).
<%@ page session=”false” %>
<HTML>
<HEAD>
<TITLE>Page Counter Using URL Rewriting</TITLE>
</HEAD>
<BODY>
<H3>Page Counter Using URL Rewriting</H3>
<%
int count = 0;
String parm = request.getParameter(“count”);
if (parm != null)
count = Integer.parseInt(parm);
if (count == 0) {
%> This is the first time you have accessed this page. <%
}
else if (count == 1) {
%> You have accessed the page once before.<%
}
else {
%> You have accessed the page <%= count %> times before.<%
}
%>
<P> Click
<A HREF=”urlrewriting.jsp?count=<%=count + 1 %>”
>here</A> to visit the page again.
</BODY>
</HTML>

Set 2//1. Using pencil tool create an image of landscape, and color it with Brush tool.
Step 1: run Photoshop
Step 2: click file menu -> new -> select size -> press OK
Step 3: in dialog box, click on preset -> select landscape in size box -> press OK
Step 4: click on pencil tool in tool menu
Step 5: draw an image in landscape using pencil tool
Step 6: right click on pencil tool and select brush tool
Step 7: using brush tool, fill the color in landscape image
Step 8: go to file menu -> save as
Step 9: select JPEG format
Step 10: enter file name -> click SAVE//2. Create an HTML page containing the following features
a. 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 cookie.
<%@page contentType=”text/html”%>
<html>
<head>
<title></title>
</head>
<body>
<center>
<form action=”next.jsp” method=”post”>
Please Enter Your Detials !<br>
First Name    <input type=”text” name=”firstname”><br>
Last Name     <input type=”text” name=”lastname”><br>
<input type=”submit” name=”submit” value=”Submit”>
</form>
</center>
</body>
</html>Next.jsp
<%@page contentType=”text/html”%>
<%@page pageEncoding=”UTF-8?%>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8?>
<title>JSP Page</title>
</head>
<body>
<%
String firstname=request.getParameter(“firstname”);
String lastname=request.getParameter(“lastname”);out.println(“<font color=blue>Welcome</font>    ”+firstname+” “+lastname+”  Thank you for loging in!”);
%>
</body>
</html>Set 3//1. Write a JSP program to display current date and time and suitable welcome message. 
a. If time is between 5AM and 12 PM display welcome message as ‘Good Morning’
b. If time is between 12 PM and 5 PM display welcome message as ‘Good Afternoon’
c. After 5PM display message as ‘Good evening’.
<%@page language=”java”%>
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h1>
<% java.util.Date d=new java.util.Date();
int time=d.getHours();
if(time>5 && time<12)
out.println(“\n Good Morning !”);
esle if(time>12 && time<17)
out.println(“\n Good Afternoon !”);
else if(time>17)
out.println(“\n Good Evening !”);
%>
</h1>
current time is :<%=d.getHours()%>:<%=d.getMinutes()%>
</body>
</html>

//2. Using Rubberstamp tool, create a clone image
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select image -> click open
Step 4: select rubberstamp tool from tool menu
Step 5: press ALT then left click on image to begin
Step 6: click on the image and drag where you want to make clone of that image
Step 7: go to file -> save as
Step 8: select JPEG format
Step 9: enter file name -> click SAVE
Set 4
//1. Using Gradient tool, create some backgrounds for photos.
Step 1: run Photoshop
Step 2: go to file menu -> new -> select size -> press ok
Step 3: select gradient tool from tool menu
Step 4: choose gradient (linear/ radial/ angle/ diamond) from option toolbar
Step 5: press left click on mouse then drag on image to create gradient
Step 6: go to file -> save as
Step 7: select JPEG format
Step 8: enter file name -> click SAVE
//2. .Create an HTML page containing the following features
a. A combo box containing the list of 7 colors: Violet, Indigo, Blue, Green, Yellow, Orange, Red
b. 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).
<html>
<head>
<title>Showing Message in Status Bar</title>
</head>
<body>
<script language=”JavaScript”>
functionfn()
{
num=document.frm.vibgyor.selectedIndex;
if(num==0)
{
window.status=”You have selected Violet.”;
}
if(num==1)
{
window.status=”You have selected Indigo.”;
}
if(num==2)
{
window.status=”You have selected Blue.”;
}
if(num==3)
{
window.status=”You have selected Green.”;
}
if(num==4)
{
window.status=”You have selected Yellow.”;
}
if(num==5)
{
window.status=”You have selected Orange.”;
}
if(num==6)
{
window.status=”You have selected Red.”;
}
}
</script>
<form name=”frm”>
<select name=”vibgyor” onChange=fn()><option>Violet</option>
<option>Indigo</option>
<option>Blue</option>
<option>Green</option>
<option>Yellow</option>
<option>Orang</option>
<option>Red</option>
</select>
</form>
</body>
</html>
Set 5

//1. Create an HTML page containing the following features
a. A combo box containing the list of  7 colors: Violet, Indigo, Blue, Green, Yellow, Orange, Red
b. An empty 1X1 table with default background color: White
c. 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). 
<html>
<head>
<title>
Changing Table Color by selecting color from the ComboBox
</title>
</head>
<body>
<script language= “JavaScript”>
functionfn()
{
num=document.frm.vibgyor.selectedIndex;
if(num==0)  {
document.getElementById(“tab”).bgColor=”Violet”;
}
if(num==1)
{
document.getElementById(“tab”).bgColor=”Indigo”;
}
if(num==2)  {
document.getElementById(“tab”).bgColor=”Blue”;
}
if(num==3)
{
document.getElementById(“tab”).bgColor=”Green”;
}
if(num==4)
{
document.getElementById(“tab”).bgColor=”Yellow”;
}
if(num==5)
{
document.getElementById(“tab”).bgColor=”Orange”;
}  if(num==6)
{
document.getElementById(“tab”).bgColor=”Red”;
}
}
</script>
<form name=”frm”>
<select name=”vibgyor” onChange=fn()>
<option>Violet</option>
<option>Indigo</option>
<option>Blue</option>
<option>Green</option>
<option>Yellow</option>
<option>Orange</option>
<option>Red</option>
</select><br><br><br><br>
<table id=”tab” border=”1?>
<tr>
<th>Name</th>
<th>Registration Number</th>
</tr>
<tr>
<td>priyanka rani</td>
<td>072B5725</td>
</tr>
</table>
</form>
</body>
</html>

//2. Import a ‘JPEG’ format image and save it as a ‘PSD’ image, using  layer options
Decrease the opacity of image.
Tips: Ctrl + Shift + S   = ‘save as’ window
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select a JPEG image -> click open
Step 4: go to layer -> new -> click on ‘layer from background’
Step 5: enter layer name in dialog box -> press OK
Step 6: press F7 then decrease opacity
Step 7: go to file -> save as
Step 8: select PSD format
Step 9: enter file name -> click SAVE

Set 6
//1. Open a PORTRAIT image, convert it into grayscale. Now color the image Using COLOR BALANCE, LEVELS and CURVES
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select a portrait JPEG image ->click open
Step 4: go to image -> mode -> click on Grayscale
Step 5: click “discard” in message box
Step 6: go to image -> adjustments -> image -> click on ‘curves’
Step 7: adjust curves -> press OK
Step 8: go to file -> save as
Step 9: select JPEG format
Step 10: enter file name -> click SAVE

//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 javascript functions 
a. to validate Name to contain only alphabets and of maximum length should be 25 ; Show appropriate messages on failure 
b. to validate Address field to contain maximum length of 200 characters; Show appropriate on failure and focus the ‘Address’ field text area
c. to validate phone number to contain only numeric data; show appropriate messages on failure
<html>
<head>
<title>
HTML form
</title>
<Script language=”javaScript”>
function f()
{
var name=document.f1.Name.value;
var phone=document.f1.Phone.value;
var address=document.f1.Address.value;
if(name.length==””)
{
alert(“Please enter name”);
name.focus();
return;
}
if (name.length> 25)
{
alert(“Name Field cannot contain more than 25 characters”);
name.focus();
return;
}
if (!isNaN(name))
{
alert(“Name field must be filled with only Alphabets”);
name.focus();
return;
}
if(phone.length==””)
{
alert(“Please enter phone numbar”);
phone.focus();
return;
}
if (isNaN(phone))
{
alert(“Phone Number must be numeric”);
phone.focus();
return;
}
if(address.length==””)
{
alert(“Please enter address”);
address.focus();
return;
}
if (address.length> 200)
{
alert(“Address Field can contain maximum of 200 character”);
}
}
</script>
</head>
<body bgcolor=”pink”>
<marquee><h1 align=”center”>A Sample FORM </h1></marquee>
<form name=f1>
Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=textbox name=”Name”><br>
Phone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=textbox name=”Phone”><br>
Address:&nbsp;&nbsp;<textarea rows=”5? cols=”50? name=”Address”></textarea><BR>
<input type=Button name=”Button” value =”Submit” onclick=f()>
</form>
</body>
</html>

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 page
b. The Second page receives the data submitted by the First Page, displays the following message
Welcome <Last Name>, <First Name>
<html>
<head>
<title></title>
</head>
<body>
<center><img src=”NIITLogo.jpg”></center>
<center>
<form action=”ToShowDataToAnotherPage” method=”post”>
Please Enter Your Detials !<br>
First Name    <input type=”text” name=”firstname”><br>
Last Name     <input type=”text” name=”lastname”><br>
<input type=”submit” name=”submit” value=”Submit”>
</form>
</center>
</body>
</html>
ToShowDataToAnotherPage  servlet
import java.io.*;
import java.net.*;
importjavax.servlet.*;
importjavax.servlet.http.*;
public class ToShowDataToAnotherPage extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throwsServletException, IOException {
response.setContentType(“text/html;charset=UTF-8?);
PrintWriter out = response.getWriter();
String firstname=request.getParameter(“firstname”);
String lastname=request.getParameter(“lastname”);
out.println(“<font color=blue>Welcome</font>    ”+firstname+” “+lastname);
}
}

//2. Open a portrait, select the eyeballs using marquee tool, and now change the color of eyes using Hue / saturation.
Tips: Ctrl + U = Hue / saturation
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select image ->click open
Step 4: click on marquee tool from tool menu
Step 5: select eyeball from the image using marquee tool
Step 6: press CTRL+U
Step 7: adjust HUE AND SATURATION from dialog box -> press OK
Step 8: go to file -> save as
Step 9: select JPEG format
Step 10: enter file name -> click SAVE

Set 8


//1. Open 3 to 4 images in a same layer. Using filter effects create creative backgrounds for book cover page.
Step 1: run Photoshop
Step 2: go to file menu -> new -> select background size -> press OK
Step 3: go to filter -> noise -> add noise
Step 4: adjust amount in noise dialog box -> press OK
Step 5: go to file menu -> open
Step 6: select 3-4 images -> click open
Step 7: select images, copy and paste them in background one by one
Step 8: go to file -> save as
Step 9: select JPEG format
Step 10: enter file name -> click SAVE

//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:
c. Library Name: Hariharan Music Site
 Slno Song Name      Film          Artiste
      1 PATA-PATA Apthamitra Udith Narayan
      2 Kana Kanade Apthamitra Madhubalakrishna
      3 Anku Donku Apthamitra S P Balasubramanyam
      4 Kalavanu        Thadeyoru Apthamitra Hariharan
      5 Bombe      Anayya      Unknown
<html>
<head>
<tittle>
Hiriharan Songs Site
</title>
</head>
<body>
<marquee><font color = blue><b>Welcome to Hariharan’s Songs Site</b></font></marquee>
<center>
<table border=1>
<tr>
<th>S.No.</th>
<th>Song Name</th>
<th>Film</th>
<th>Artist</th>
<tr>
<tr>
<td>1.</td>
<td><a href=”song1.html”>Patta-Patta</a></td>
<td>Apthamitra</td>
<td>Udit Narayan</td>
</tr>
<tr>
<td>2.</td>
<td><a href=”song2.html”>Kana Kanede</a></td>
<td>Apthamitra</td>
<td>Madhubalakirishna</td>
</tr>
<tr>
<td>3.</td>
<td><a href=”song3.html”>AnkuDonku</a></td>
<td>Apthamitra</td>
<td>S P Balasupramanniyam</td>
</tr>
<tr>
<td>4.</td>
<td><a href=”song4.html”>Bombay</a></td>
<td>Anaya</td>
<td>Unknown</td>
</tr>
</table>
</center>
</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
<html>
<head>
</head>
<tittle>
Data Table
</title>
<body>
<table border=1>
<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>Shrinivas</td>
<td>G</td>
<td>Mercara</td>
<td>08965445454</td>
</tr>
</table>
</body>
</html>

//2. Open an image and adjust a level of image. 
Tips: Ctrl + L = level
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select an image -> click open
Step 4: go to image -> adjustments -> click on level or press ctrl + l
Step 5: adjust level -> press OK
Step 6: go to file -> save as
Step 7: select JPEG format
Step 8: enter file name -> click SAVE

Set 10

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

//2. Change an image size 22 cm x 29 cm to 44 cm x 58 cm. and resolution 72 to 300.
Step 1: run Photoshop
Step 2: go to file menu -> open
Step 3: select an image with 22 cm x 29 cm size -> click open
Step 4: go to image -> image size
Step 5: change image size to 44 cm x 58 cm size with 100 resolutions -> press OK
Step 6: go to file -> save as
Step 7: select JPEG format
Step 8: enter file name -> click SAVE

Set 11

//1. Create some geometrical shapes, using shape tool.
Step 1: run Photoshop
Step 2: go to file menu -> new -> select size -> press OK
Step 3: click on ‘custom shape tool’ from tool menu
Step 4: click on ‘custom shape picker’ in options toolbar
Step 5: click on smart tag -> select all then click append
Step 6: choose shape from option toolbar
Step 7: left click on background and drag mouse to draw shape
Step 8: go to file -> save as
Step 9: select JPEG format
Step 10: enter file name -> click Save

Set 12

//1. Type text ‘GRADATION’ and apply gradient tool on text.
Step 1: run Photoshop
Step 2: go to file menu -> new -> select size -> click OK
Step 3: click on text from tool menu
Step 4: type text “GRADATION”
Step 5: click on layer from layer property
Step 6: right click on selected layer and click on ‘blending options’
Step 7: click and check on ‘gradient overlay’
Step 8: adjust gradient or change angle to 0o -> then press OK
Step 9: go to file menu -> save as
Step 10: select JPEG format
Step 11: enter file name -> click SAVE

//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
<html>
<head>
</head>
<tittle>
Data Table
</title>
<body>
<table border=1>
<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>Shrinivas</td>
<td>G</td>
<td>Mercara</td>
<td>08965445454</td>
</tr>
</table>
</body>
</html>

Set 13


//1. Write C Program to create Indian Flag.
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<graphics.h>
const float PI=3.14154;
void main()
{
int gdriver=DETECT,gmode=0;
int I;
Int x,y;
initgraph(&gdriver,&gmode,”c:\\tc\\bgi”);
cleardevice();
rectangle(0,0,639,479);
outtextxy(250,20,”INDIAN FLAG”);
rectangle(80,50,560,380);
line(80,160,560,160);
line(80,270,560,270);
setfillstyle(SOLID_FILL,LIGHTRED);
floodfill(85,60,getmaxcolor());
setfillstyle(SOLID_FILL,WHITE);
floodfill(85,170,getmaxcolor());
setfillstyle(SOLID_FILL,GREEN);
floodfill(85,280,getmaxcolor());
setcolor(BLUE);
circle(320,215,50);
for(I=0;I<=360;I+=15)
{
x=50*cos(I*PI/180);
y=50*sin(I*PI/180);
line(320,215,320+x,215-y);
}
setcolor(CYAN);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,6);
outtextxy(200,400,”    JAI HIND!!!” ) ;
getch();
}

//2. Write C Program to create FISH structure using basic geometric  Functions.
#include<graphics.h>
#include<stdlib.h>
#include<conio.h>
#include<dos.h>
void main()
{
int gd=DETECT,gm,i,j,p,q,x,y,k,flag;
struct arccoordstype arcinfo;
initgraph(&gd,&gm,”c:\\tc\\bgi”);
y=getmaxy()/2;
i=0;
p=0;
q=0;
j=0;
flag=0;
setcolor(WHITE);
for(k=0;k<500;k++)
putpixel(random(620),random(419),15);
while(!kbhit())
{
line(0+i,y+20,0+i,y-20);  /*triangle*/
line(0+i,y+20,20+i,y);
line(0+i,y-20,20+i,y);
ellipse(80+i,y,10-p,350+p,60,25);
line(140+i,y+3,130+i,y+8);
line(130+i,y+8,140+i,y-5);
if(flag==0)
p=p+2;
if(flag==1)
p=p-2;
circle(120+i,y-6,5);
line(60+i,y-25,30+i,y-45+j);
line(30+i,y-45+j,100+i,y-25);
line(60+i,y+25,30+i,y+45+q);
line(30+i,y+45+q,100+i,y+25);
i=i+3;
if(i>=638)
i=0;
if(flag==0)
j=j-2,q=q+2;
if(flag==1)
j=j+2,q=q-2;
if(j<=-10)
flag=1;
else if(j>=0)
flag=0;
delay(10);
cleardevice();
}
getch();
closegraph();
}

Set 14

//1. Write Open GL Program to create a Window and display HELLO inside.
#include<GL/glut.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glBegin(GL_POLYGON);
glVertex3f(0.25,0.25,0.25);
glVertex3f(0.75,0.25,0.0);
glVertex3f(0.75,0.75,0.0);
glVertex3f(0.25,0.75,0.0);
glEnd();
glFlush();
}
Void init(void)
{
glClearColor(0.0,0.0,0.0,0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0,1.0,0.0,1.0,-1.0,1.0);
}
Int main(int argc,char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(250,250);
glutInitWindowPosition(100,100);
glutCreateWindow(“HELLO”);
init();
glutDisplayFunc(display);
glutMainLoop();
return 0;
}

//2. Create a simple static web page for a college (assume necessary information)
<html>
<head>
<title>My College Site</title>
</head>
<body bgcolor=”gray” text=”white” >
<div id=”banner” style=”width:800px; height:120px; background-color:black”>
<img src=”file:///C:/banner.gif” width=800 height=120></div>
<div id=”header” style=”position:absolute; left:100px; top:30px; width:350px; height:75px”>
<div><h1><font color=”red” face=”Monotype corsiva”>My College Site</font></h1></div>
</div>
<div id=”header” style=”position:absolute; background-color:black; top:135px; width:200px; height:500px”>
<ul id=”listitem” type=”circle”>
<li><a href=abc.html target=”_self”>Home</a></li>
<li><a href=”Sitemap.html”>Sitemap<a></li>
<li><a href=”About.html”>About Us<a></li>
</ul>
</div>
<div id=”header” style=”position:absolute; background-color:black; left:215px; top:135px; width:590px; height:500px”>
<h3><font color=”red”>Online Admission</font></h3>
<form id=”frm1?>
Enter your name: <input type=”text” id=”text1? /> <br/><br/>
Gender: <input type=”radio” id=”gender1? name=”gend” />Male <input type=”radio” id=”gender1? name=”gend” />Female  <br/><br/>
Qualification: Matric<input type=”checkbox” id=”check1? /> Enter<input type=”checkbox” id=”check1? /><br/><br/>
<input type=”reset” value=”Reset” />
<input type=”submit” value=”Submit” post=”” /><br/><br/>
</form>
</div>
</body>
</html>