Practical List

Questions

Practical List based on DSE2: Internet Technologies Guidelines B. Sc. Program Computer Science 6th Semester

HTML & CSS

1. Create HTML document with following formatting – Bold, Italics, Underline, Colors, Headings, Title, Font and Font Width, Background, Paragraph, Line Brakes, Horizontal Line, marquee text.

2. Create HTML document with Ordered and Unordered lists.

3. Create your time table using HTML tables.

4. Create a Registration / Admission or Feedback Form with Input Type, Select and Text Area, Text Box, Option/radio buttons, Checkboxes, Reset and Submit buttons using HTML.

5. Create an HTML document (having multiple frames) showing horizontal and vertical frames having Internal and External links to different web pages. Apply CSS styles for formatting the webpages.

JAVA PROGRAMS

6. Write a program to create an array of 10 integers. Accept values from the user in that array. Input another number from the user and find out how many numbers are equal to the number passed, how many are greater and how many are less than the number passed.

7. Write java program for the following matrix operations:

a. Addition of two matrices

b. Multiplication of two matrices

c. Transpose of a matrix -- Take input of elements of matrices(html-4.html) from user.

8. Write a java program that computes the area of a circle, rectangle and a Cylinder using function overloading.

9. Implement a Bank Account having Instance variables: Account Number, Balance and having methods

- float Deposit (float x)

- float withdraw (float x)

- int get account no ()

- float get balance ()

- tax deduction ()

Then implement class Bank having an array list of accounts of type BankAccount. Implement following methods:

- AddAccount in Bank

- Get Total balance in Bank

- Get account number with max. and min. balance

- Find an account given a bank account no.

- Count no. of accounts having atleast specific balance

10. Write a program that reads two integer numbers for the variables a and b. If any other character except number (0-9) is entered then the error is caught by NumberFormatException object. After that ex.getMessage() prints the information about the error occurring causes.

11. Create a class called Fraction that can be used to represent the ratio of two integers. Include appropriate constructors and methods. If the denominator becomes zero, throw and handle an exception

12. Create a base class called Shape. It should contain 2 methods getcoord() and showcorrd () to accept X and Y coordinates and to display the same respectively. Create a sub class called Rect. It should also contain a method to display the length and breadth of the rectangle called showCorrd(). In main method, execute the showCorrd() method of the Rect class by applying the dynamic method dispatch concept.

JAVASCRIPT

13. Create a student registration form. Create functions to perform the following checks:

a. Roll number is a 7-digit numeric value

b. Name should be an alphabetical value(String)

c. Non-empty fields like DOB

14. Implement a static password protection.

15. Write a java script

a. To change the colour of text using SetTimeOut()

b. To move an image across screen using SetInterval()

JDBC

16. Create a table 'Student' and ‘Teacher’ in 'College' database and insert two rows in this newly created table using JDBC API and do the following:

a. Update an already created table 'Teacher' in 'College' database by updating a teacher's name, with "Dr." appended before the name, whose name is "Rita".

b. Repeat the same thing for all the teachers using PreparedStatement.

c. Delete the student with ID=3 from 'Student' database.

d. Insert two students to the ResultSet returned by the query which selects all students with FirstName="Ayush".The database must also get updated along with ResultSet.

17. Create a procedure in MySQL to count the number of Rows in table 'Student'. Use Callable Statement to call this method from Java code.

JSP

18. Display the pattern:<br>Update an already created table 'Teacher' in 'College' database by updating a teacher's name, with "Dr." appended before the name, whose name is "Rita".<br>1 <br>1 2 <br>1 2 3<br>Take ‘n’ in a textbox from user. Display this pattern using Scriptlets <c:forEach> loop.

19. Make two files as follows: a. main.html: shows 2 text boxes and 3 radio buttons with values "addition", "subtraction" and "multiplication" b. operate.jsp: depending on what the user selects perform the corresponding function (Give two implementations: using request.getParameter() and using expression language)

20. Validate User input entered in a form. The input must include Name, DOB, Email ID, Lucky Number, Favourite food etc.

21. Display Good Morning <uname>, Good Afternoon <uname> or Good Evening <uname> based on the current time of the day.

22. Let the user enter a word in a textbox and let her/him select one of even or odd radio buttons. If she/he selects odd, check the odd positions in the word entered, if they all contain vowels, then display the message ‘You win’, else display ‘You lose’. Similarly, if the user selects even, check for vowels in all even positions in the word entered. Use jstl’s ‘fn’ library.

23. Ask a user's name Java Server Pages by Hans Bergsten age on a HTML form. Then display Hello <uname> on a JSP. On the same page ask the product the user would like to buy. Then redirect to another JSP which would display: Hello <uname>, You have ordered <product>. (Use Session Scope Variable using setTag)

Last updated