Namma Kalvi 12th Computer Applications Practical Manual em
Namma Kalvi 12th Computer Applications Practical Manual em
01
www.nammakalvi.org
exercise
PageMaker-Page Formatting
AIM
To create a new document using thedefault given options.
1. Open Pagemaker 7.0 and create a new document layout which includes the following
setup options:
●● Page size – A4.
●● Number of Pages – 4.
●● Margins 1.25 inches- top, and .75 inches - all other sides.
3. Set the heading ‘HAPPINESS’ in 18 points, Arial font, bold and alignment centre.
277
www.nammakalvi.org
Procedure
1. Start the PageMaker using the following commands.
Start -> All Programs -> Adobe -> PageMaker 7.0 -> Adobe PageMaker 7.0. The
Adobe PageMaker window will be opened as shown in Figure.
278 Practicals
www.nammakalvi.org
2. Choose File > New in the menu bar. (or) Press Ctrl + N in the keyboard.
This opens the Document Setup dialog box.
●● Click the Page Size drop down list box and select A4 size.
●● In the Number of pages text box, type 4.
●● Set the values in the Margins sections as follows :
Inside – – 0.75 inches
Outside – 0.75 inches
Top – 1.25 inches
Bottom – 0.75 inches
Practicals 279
3. Click on OK. Now a new document called Untitled – 1 will appear on the screen as
shown in Figure.
4. Click on the Text tool and create a text block. Then type the following text in the text
block.
HAPPINESS
Happiness is often confused with fun, good living, and riches. Sometimes fun is
equated with happiness. Fun is what we experience while doing an activity, whereas
happiness is a residual and long-lasting feeling. The path to happiness is long and
full of challenges. Happiness requires life-long pursuit.
280 Practicals
www.nammakalvi.org
5. Select the word ‘HAPPINESS’ with Text tool. Using Character Control Palette,
change the font to Arial, font size to 18, and Leading 22. Then click on Bold button.
Then press Shift + Ctrl + C for centre alignment.
Practicals 281
6. Select the paragraph with Text tool. Using Character Control Palette, change the
font to Arial, font size to 12, and Leading 20. Then press Shift + Ctrl + J for Justify.
282 Practicals
www.nammakalvi.org
Output
HAPPINESS
Happiness is often confused with fun, good living, and riches. Sometimes fun is
equated with happiness. Fun is what we experience while doing an activity, whereas
happiness is a residual and long-lasting feeling. The path to happiness is long and
full of challenges. Happiness requires life-long pursuit.
Conclusion
The expected output is achieved.
Practicals 283
02
exercise
AIM
To create a Student Notice Board.
Procedure
1. Start the PageMaker using the following commands.
Start -> All Programs -> Adobe -> PageMaker 7.0 -> Adobe PageMaker 7.0. The
Adobe PageMaker window will be opened.
2. Choose File > New in the menu bar (or) Press Ctrl + N in the keyboard.
This opens the Document Setup dialog box.
3. Click on OK button.
Now a new document called Untitled – 1 will appear on the screen.
4. Create a box with dimension 100 mm x 100 mm using the Rectangle tool. Fill it with
cyan colour and change the percentage value of tint to 25%. The resulting box is as
shown in Figure.
284 Practicals
www.nammakalvi.org
5. Similarly create another box with dimension 100 mm x 15 mm. Fill it with black
colour and place it on the top portion of the cyan filled box as shown in figure.
Practicals 285
6. With the text tool click and drag the mouse from the left corner to the right corner
of the black filled box and type the following words “Student Notice Board”.
The colour of the text and the colour of the box will be same black colour. As soon
as you finish typing press Ctrl + A in the keyboard which will select the entire text.
Using Character Control palette change the font size to 20 points and click on the
Bold button. Then click on the Reverse button which will change the colour of the
text to white and press Shift + Ctrl + C for centre alignment. The result is as shown
in Figure.
Output
Conclusion
The expected output is achieved.
286 Practicals
03
exercise
Procedure
1. Start the PageMaker using the following commands.
Start -> All Programs -> Adobe ->Pagemaker 7.0 -> Adobe PageMaker 7.0. The
Adobe PageMaker window will be opened as shown in Figure 1.1.
Practicals 287
287
2. Choose File > New in the menu bar (or) Press Ctrl + N in the keyboard.
This opens the Document Setup dialog box.
288 Practicals
www.nammakalvi.org
3. Click on OK.
Now a new document called Untitled – 1 will appear on the screen as shown in
Figure.
Practicals 289
5. Select the Rectangle Tool from the Tool box and draw a rectangle.
6. Using Control Palette, the width and height value of the rectangle has to be set to 95
mm and 55 mm respectively.
290 Practicals
7. Select the Text Tool in the Tool box. Then drag from the left corner of the rectangle
box to the right corner to specify the boundary of the text that is to be typed.
8. Type the Name of the person and select it using Text tool. Choose suitable Font and
Font Size from the Control Palette. Then move it a little bit towards right side.
Practicals 291
9. Repeat the step 7. Then type the Company name and select it using Text tool. Choose
suitable Font and Font Size from the Control Palette. Then move it a little bit towards
right side.
Select the First character using the Text tool and increase the font size.
292 Practicals
10. Repeat the step 7. Then type the Company Address and select it using Text tool.
Choose suitable Font and Font Size from the Control Palette. Then move it towards
right side.
Output
Conclusion
The expected output is achieved.
Practicals 293
04
exercise
AIM
To create a Label using PageMaker software.
Procedure
1. Start the PageMaker using the following commands.
Start -> All Programs -> Adobe ->Pagemaker 7.0 -> Adobe PageMaker 7.0.
2. Choose File > New in the menu bar (or) Press Ctrl + N in the keyboard.
This opens the Document Setup dialog box.
3. Click on OK.
Now a new document called Untitled – 1 will appear on the screen.
4. Now you can change Measuring Units from Inches to Millimeters.
Choose File > Preferences > general (or ) Press Ctrl + K. Now Preferences dialogue
box appears.
Change the unit of Measurements and Vertical ruler to Millimeters.
294 Practicals
5. Select the Rectangle Tool from the Tool box and draw a rectangle.
6. Using Control Palette, the width and height value of the rectangle has to be set to
100 mm and 40 mm respectively.
8. Choose the required shape from the rounded corners dialog box. Now the rectangle
appears with the rounded corners.
9. Select the Text Tool in the Tool box and create a text block within the rectangle.
10. Type Name : and press a Tab key and then press Enter key.
Type STD : and press a Tab key and then press Enter key.
Type Section : and press a Tab key and then press Enter key.
Type School : and press a Tab key and then press Enter key.
13. Set a right tab at the value 90 mm and choose the dotted line style from the leader
option and then press Apply button.
Practicals 295
14. Now the required label is created.
Output
Conclusion
The expected output is achieved.
296 Practicals
05
exercise
MySQL - Usage of
Commands in Data Base
www.nammakalvi.org
AIM
To execute following DDL [Data definition Language] and DML [Data manipulating
Language] MySQL queries
1. CREATE - to create a database and its objects like (table, index, views, store procedure,
function, and triggers)
2. ALTER - alters the structure of the existing database.
3. DROP - delete objects from the database.
4. SELECT - retrieve data from a database.
5. INSERT - insert data into a table.
6. UPDATE - updates existing data within a table.
7. DELETE - Delete all records from a database table.
Procedure
1. Open MySQL command prompt from XAMPP Control panel.
2. To login in to your Database using User name and password.
3. Execute and get the output of given DDL MySQL queries.
SYNTAX:
Based on the below syntax queries are built and executed.
* CREATE DATABASE testDB;
* CREATE TABLE table_name (column1datatype,column2datatype,column3datatype, .... );
* ALTER TABLE `table_name` ADD COLUMN `column_name` `data_type`;
* DROP DATABASE databasename;
* SELECT * FROM TABLE NAME
* INSERT INTO table_name( field1, field2,...fieldN ) VALUES ( value1, value2,...valueN );
* UPDATE table_name SET field1 = new-value1, field2 = new-value2 [WHERE Clause]
* DROP TABLE table_name ;
Practicals 297
297
PROGRAM:
CREATE DATABASE SchoolDB;
studentID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
298 Practicals
OUTPUT
Database created
Table created:
studentID LastName FirstName Address City
Table Altered
Database dropped
StudentID LastName FirstName Address City
101 C Priya 1, new street Trichy
202 S Ramu 5, North garden Madurai
St
One row inserted.
StudentID LastName FirstName Address City
101 C Priya 1, new street Trichy
202 S Ramu 5, North garden Madurai
St
002 Ram Kumar ROJA NAGAR CHENNAI
003 R Krishna Park Street Coimbatore
StudentID LastName FirstName Address City
101 C Priya 1, new street Trichy
202 S Ramu 5, North garden Madurai
St
002 Ram Kumar ROJA NAGAR CHENNAI
003 SRI Krishna Park Street Coimbatore
Table dropped.
Table not found.
Practicals 299
06
exercise
PHP–Basic Programing
www.nammakalvi.org
AIM
To create and execute a basic PHP programing
Procedure
1. Start Xampp server (Apache)
2. Goto virtual path folder (C:\xampp\htdocs)
3. Create test.php file and type the program
4. Execute the program on your Web browser using by this URL link (http://localhost/
test.php)
PROGRAM
<html>
<body>
<?php
echo “Welcome to Our School”;
$color = “blue”;
echo “My car is “ . $color . «<br>”;
echo “My dress is “ . $COLOR . «<br>”;
echo “My box is “ . $coLOR . «<br>”;
// test whether a number is greater than 30, 20 or 10 using ternary operator
functiontrinary_Test($n){
300 Practicals
$r = $n > 30
? “greater than 30”
: ($n > 20
? “greater than 20”
: ($n >10
? “greater than 10”
: “Input a number atleast greater than 10!”));
echo $n.” : “.$r.”\n”;
}
trinary_Test(32);
trinary_Test(21);
trinary_Test(12);
trinary_Test(4);
?>
</body>
</html>
OUTPUT
My car is blue
My dress is
My box is
32 : greater than 30
21 : greater than 20
12 : greater than 10
4 : Input a number atleast greater than 10!
Practicals 301
07
exercise
AIM
To create and execute a PHP Variables Example program
Procedure
1. Start Xampp server (Apache)
2. Goto virtual path folder (C:\xampp\htdocs)
3. Create Variable.php file and type the program
4. Execute the program on your Web browser using by this URL link (http://localhost/
Variable.php)
PROGRAM
<html>
<body>
<?php
$a = 25; // Numerical variable
$b = “Hello”; // String variable
$c = 5.7; // Float variable
echo ‚Number is : “.$a.‚<br/>”;
echo ‚String is : “.$b.‚<br/>”;
echo “Float value : “.$c;
$txt = “INDIA”;
echo “I love $txt!”;
$x = 2;
$y = 2;
302 Practicals
echo $x + $y;
function demo() {
echo «<p>Variable x inside function is: $x</p>»;
}
demo();
echo “<p>Variable x outside function is: $x</p>”;
function myTest() {
static $a = 0;
echo $a;
$a++;
}
myTest();
echo “<br>”;
myTest();
echo “<br>”;
myTest();
?>
</body>
<html>
OUTPUT
Number is : 25
String is : Hello
Float value : 5.7
I LOVE INDIA
4
0
1
2
Variable x inside function is:
Variable x outside function is: 2
Practicals 303
08
exercise
AIM
To create and execute ECHO and PRINT statements in PHP program.
Procedure
1. Start Xampp server (Apache)
2. Goto virtual path folder (C:\xampp\htdocs)
3. Create echo-print.php file and type the program
4. Execute the program on your Web browser using by this URL link
(http://localhost/ echo-print.php)
PROGRAM
<html>
<body>
<?php
//Use Echo
echo “Welcome to Tamilnadu<br>”;
// Use ‘print’ to print on console
print “Welcome to our School!<br>***********”;
$txt1 = “Learn PHP”;
$txt2 = “Daily”;
$x = 5;
$y = 4;
304 Practicals
echo “<h2>” . $txt1 . «</h2>»;
echo “Study PHP “ . $txt2 . «<br>”;
echo $x + $y;
$txt3 = “Hello”;
$txt4 = “Welcome”;
$x = 7;
$y = 3;
OUTPUT
Welcome to Tamilnadu
Welcome to our School!
***********
Learn PHP
Study PHP Daily
9
HELLO
Hi Welcome
10
Practicals 305
09
exercise
String Functions
www.nammakalvi.org
AIM
To create and execute String Functions in PHP
Procedure
1. Start Xampp server (Apache)
2. Goto virtual path folder (C:\xampp\htdocs)
3. Create funtion.php file and type the program
4. Execute the program on your Web browser using by this URL link
(http://localhost/ funtion.php)
<html>
<body>
<?php
// Displays the length of the string
echostrlen(“Hello world!”);
//Counting number of words in a String
echo str_word_count(“Good Morning All”);
// Reversing a string
echo strrev(“welcome”);
306 Practicals
// calculates position of strong
echo strpos(“Hello world!”, “world”);
// replacing the text
echo str_replace(“Hi”, “Hello”, “Hi Everyone”);
define(“GREETING”, “Good Morning!!!”);
echo GREETING;
// changes the color of the first character of a word
$text = ‘PHP Tutorial’;
$text = preg_replace(‘/(\b[a-z])/i’,’<span style=”color:red;”>\1</span>’,$text);
echo $text;
?>
</body>
</html>
OUTPUT
12
3
emoclew
6
Hello Everyone
Good Morning!!!
PHP Tutorial
Practicals 307
10
exercise
AIM
Write a PHP program to convert word to digit.
Procedure
1. Start Xampp server (Apache)
2. Goto virtual path folder (C:\xampp\htdocs)
3. Create convert.php file and type the program
4. Execute the program on your Web browser using by this URL link
(http://localhost/convert.php)
<html>
<body>
<?php
functionword_digit($word) {
$warr = explode(‘;’,$word);
$result = ‘’;
foreach($warr as $value){
switch(trim($value)){
case ‘zero’:
$result .= ‘0’;
break;
case ‘one’:
$result .= ‘1’;
break;
case ‘two’:
308 Practicals
$result .= ‘2’;
break;
case ‘three’:
$result .= ‘3’;
break;
case ‘four’:
$result .= ‘4’;
break;
case ‘five’:
$result .= ‘5’;
break;
case ‘six’:
$result .= ‘6’;
break;
case ‘seven’:
$result .= ‘7’;
break;
case ‘eight’:
$result .= ‘8’;
break;
case ‘nine’:
$result .= ‘9’;
break;
}
}
return $result;
}
echoword_digit(“zero;three;five;six;eight;one”).”\n”;
echoword_digit(“seven;zero;one”).”\n”;
?>
</body>
</html>
OUTPUT
035681
701
Practicals 309
www.nammakalvi.org