Beruflich Dokumente
Kultur Dokumente
e.g. 0 , 1 , 1 , 2, 3 , 5 , 8 , 13 , …………..
Q. 4. Write a program to print out multiplication tables from 9 to 17 using (I) for
loops (II) while loops (III) do loops.
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Q . 7. Define a class called Circle with the attributes radius, circumference, and area of
the circle. Write a program to display all attributes of the circle for 5 Circles. Radius for
all 5 circles should be accepted as command line input at the beginning. e.g. java
Circlejava 5 10 12 25 36
Q . 8. Write a program to find the Factorial of a number using Recursion. Factorial can
be defined as Factorial(n) = 1 * 2 * 3 ….* (n-1) * n.
Q . 9. Write a program to get the input values Principal, rate of interest and number of
Years from the keyboard and find the simple interest.
Q. 10. Write a program to create an applet with yellow back ground and display the
Message WELCOME TO THE JAVA WORLD. Write its HTML document also.
Q. 11. Write a java program to create a Frame with three buttons Morning, Afternoon
and Evening. When we click Morning button, the message “Good Morning to you” must
be displayed. Similar messages must be displayed for the other buttons also.
Q. 12. Write a Java program to create a List box with some colors in the items. When
the color is selected, the background color must change accordingly. Write a program
which creates and displays the details in the List box on the window.
Q . 14. Write a Java program to create a Frame which responds to the mouse click. For
each event with mouse ( such as mouse up, mouse down etc.) the corresponding message
must be displayed.
Q . 16 . Write a Java program to create simple Calculator for 4 basic Math operations,
Addition, Subtraction, Multiplication and Division. In the window there are four
radio buttons called Add, Sub, Mul and Div at the Top. This group is called Operation.
There are two textfield objects to input first and second number.We must type the
numbers and select one of the operations. When we click the perform button, the result is
displayed. For example if the first number is 10 and second number is 72 And operation
selected is Mul then the result is displayed as,
Create a class ToyCollection that stores information about different toys in a toy shop.
The information to be stored about a single toy is,
- Method that displays all details about a single toy in the following
format, e.g. Here Total price should be calculated.
A small scale private company has 2 categories of employees, i.e. Regular and Daily
wages type. This program should accept information from the user, about 3 regular
Employees and 3 Daily category employees and store this data in a display of objects.
At the end this program should ask the user to enter the employee id number and should
find out whether the particular employee is present or not. If the employee is present
then his monthly salary and other information should be displayed in the following
manner,
If the employee is not found then proper error message should be displayed and stop the
program.
2. regularEmp class : This is one subclass of above defined Emp class and
stores following information,
- Basic salary as float
- Allowance as float
- Deductions as float
- Constructor.
- Overridden method calculate Salary to calculate and
return monthly salary.
Method that displays the data in this class and super
class in the required output format.
3. dailyEmp class : This is one subclass of above defined Emp class and
stores following information
OR
Create 2 Thread classes.One Thread is Incrementor and has one variable cnt1
with initial Value 0. Incrementor thread increments value of cnt1 by 1 each
time. The other thread is Decrementor which has variable cnt2 with initial value
100. Decrementor thread decrements value of cnt2 by 1 each time.
- Incrementor thread increments value of cnt1 by one and notifies the other thread
about this value
- The decrementor thread decrements value of its variable cnt2 by one and
compares values of cnt1 and cnt2. If values of cnt1 and cnt2 are different then
notifies the Incrementor thread and above mentioned step is repeated.
- But if values of cnt1 and cnt2 are matching then following message is displayed
Matching Value : 50
- Now Decrementor thread sets a flag as true and notifies the other thread and stops its
execution.
- As flag is set to true, Incrementor thread understands that matching has occurred and
stops its execution
End of Question 2B
WEB TECHNOLOGY
HTML Practical Programs
Q. 1 Create an HTML page as below: ( 5 marks for HTML, 5 marks for code.)
The HTML page uses an HTML FORM having two input fields to accept username
and password. Validate using Javascript that no field is empty
Q. 2 Create an HTML page to accept any number. Check whether the number is prime or
not. ( 3 marks for HTML, 7 marks for code.)
Q. 3 Create a form as follows. When user clicks on ‘submit’ button display the entered /
selected options in a new window.
2 marks
Name :
Address 2: marks
Education :
2 marks
Submit
Submit
Q. 4 Write a HTML page to insert two images, one with border and the other without
border. (4 marks) The image without border should provide links to three different html
files. (6 marks)
Name : 2 marks
4.My Speciality
My Profile
Display the relevant information in the 2nd frame on selection of a link. There
should be a link to return to home page - ‘Welcome to My Profile’ in each linked
page.
Marks Distribution:
Frame Page : 1 mark, Welcome Page – 1 mark,
Link Page to be displayed in 1st frame : 4 marks
Linked pages to be displayed in 2nd frame : 4 marks
Q. 9 Write a code to accept the 10 numbers in array. Provide the buttons for displaying
the array contents in random order, ascending order, descending order, sum of all
numbers.
Marks distribution :
Accept numbers : 2 marks, Random Order : 2 marks, Ascending Order : 2 marks,
Descending Order : 2 marks, Sum of the numbers : 2 marks
Q. 10 Write HTML code for the following:
a) (5 marks)
A B C D E
F G H
I J K L M
N O P Q R
S T U
b) (5 marks)
Create two vertical frames where first frame will be ¼ size of the screen. In first
frame display the links for 4 courses like MCM, MBA, PGDBM and MPM.
When user clicks on particular link display relevant six subjects in the second
frame. First Frame should have the background color “blue”. Second frame
should have background color “sky blue”.
Q. 11 Using Java script create an array of 10 elements. Accept values from user. Store
accepted values in list box.
Q. 12 Using Java script accept any number. Display the sum of all digits and the number
in reverse order.
Q. 15 Accept string from the user. Display its length and no. of words in the string.
Q. 16 Accept two different strings from the user. Write a java script to check whether
second string exists in first string or not.
Q. 1 Design an HTML page to accept any two numbers and do the following: (5 marks)
a) Provide the operator buttons to perform the arithmetic operations i.e. add, subtract,
multiplication and division. Display the answer in new page. (Write functions) (20
marks)
For No 1 → b) Display the lucky number in another text box on clicking a given
button. (E.g. if number entered is 272 then its lucky no. is 2 + 7 + 2 = 11 = 1 + 1 = 2.
Thus 2 is the lucky number of 272) (15 marks)
For No 2 → c) Display the accepted number in reverse order on clicking a given
button in new window. (10 marks)
OR
Q. 1 Design an HTML page to accept any string and do the following by providing
command buttons: (5 marks)
a. Display length of the string (5 marks)
b. Display each character on a new line (10 marks)
c. Replace all blank spaces with “#” symbol. (10 marks)
d. Accept a character from the user and display the occurrence of the same in a
string. (10 marks)
e. Display no. of words in a string. (10 marks)
Q. 2 Create an order form using HTML tags for purchasing books. The order form should
contain Publisher Name, Author names, Book Title, Price, Edition, Vendor Name,
Quantity. Calculate the bill amount considering Tax 4% and discount as follows:
a. if amount >=50000 15%
b. if amount >=25000 and <50000 10%
c. if amount >=15000 and <25000 5%
d. if amount<15000 Nil.
(25 marks for HTML Design. 25 marks for bill amount calculation.)
Note : Do required validations.
OR
Q. 2 Design a Registration form for new email account. Validate the inputs. Display all
entered contents on new page.
C programming
Section 1:
Marks:50
(OR)
Write a C Program to create a structured data file named Student.dat to store the roll
no, name and course.
Provide following functions:
1. Accept the values from the user using structure variables. Store the contents
in a file.
2. Display the file.
3. The user should be able to add new records to the existing file. And display
the new file.
Marks: 50
Section 2 :
Q.2 Write a C Program to declare an array for 2 0 floats. Accept the values from
the user sort the two arrays in descending order. Merge the two arrays into a
new array and display the new array.
Marks: 50
(OR)
Accept any two numbers from the user. Perform the following operations on it using
functions:
1. Addition
2. Subtraction
3. Multiplication
4. Swap the values
5. Print both the numbers in reverse order for example (if a given number is
234, it should be printed as 432)
Marks:50
SAMPLE EXAMINATION PROJECTS for Practice (50 marks each)
Menu
Please note that the project will be evaluated on the following criteria:-
Note:
1. Solve any 10 programmes.
2. Each programme carries 10 marks.
3. The weightage of these programmes is 40% (other 60% is for online
assignment
submission).
Q. 1 Calculate area and perimeter of a rectangle and a circle. Accept
concern parameters
from the user.
[ 1, Let Us C by Mr. Yashavant Kanetkar]
Q. 2 If a six digit number is input through the keyboard i.e. accept from
the user, display
a number in reverse order.
[ I, Let Us C by Mr. Yashavant Kanetkar]
Q. 3 Any 3 numbers is input through the keyboard. Display maximum
and minimum
number.
[ 2, Let Us C by Mr. Yashavant Kanetkar]
Q. 4 Any number is input through the keyboard. Display whether the
number is odd or
even.
[ 2, Let Us C by Mr. Yashavant Kanetkarl
Q. 5 Display all prime numbers between 1 and 500.
[ 3, Let Us C by Mr. Yashavant Kanetkar]
Q. 6 Any 5 digit number is inpUtthrough the keyboard. Display the
number in words. e.g
if number entered is 23435, output should be Two Three Four Three
Five.
[ 3 and 4, Let Us C by Mr. Yashavant Kanetkar]
Q. 7 Write a programme to display addition and multiplication of two
numbers. Add and
Multi are the functions to be called to perform the operation. Function
Add should not
return any value.
[ 5, Let Us C by Mr. Yashavant Kanetkar]
Q. 8 Write a function prime(int) to return whether a number is prime ot
not. [ 5, Let Us C
by Mr. Yashavant Kanetkar]
Q. 9 Create an integer array of 10 elements and accept the values from
the user. Display
array in descending order.
[ 8, Let Us C by Mr. Yashavant Kanetkar]
©Symbiosis Centre for Distance Learning
Q. 10 Create an integer array of 5 elements and accept the values from
the user. Display
sum of all elements.
[ 8, Let Us C by Mr. Yashavant Kanetkar]
Q. 11 Create an integer array of 5 elements and accept the values from
the user. Display
sum of all elements.
[ 8, Let Us C by Mr. Yashavant Kanetkar]
Q. 12 Declare a character array of 25 elements and accept any string
from the user.
Display length of a string with using strien function. Also replace all s
with r’.
[ 9, Let Us C by Mr. Yashavant Kanetkar]
Q. 13 Declare a character array of 50 elements and accept any string
from the user. Copy
this string to another array using pointer. (Do not use strcpy function.)
[ 9, Let Us C by Mr. Yashavant Kanetkar]
Q. 14 Create a structure for student containing roll no., name, city and
course. Write a
programme to accept and display the values using structure.
[ 10, Let Us C by Mr. Yashavant Kanetkar]
Q. 15 Write a programme to count the number of words and characters
in a given text
file.
[ I Let Us C by Mr. Yashavant Kanetkar]
Q. 16 Write a programme to display the contents of a given text file.
Also write a code to
append the contents to the given text file.
[ ii, Let Us C by Mr. Yashavant Kanetkar]
©Symbiosis Centre for Distance Learning