It Report Computer Science 3
It Report Computer Science 3
INTRODUCTION
1.1 HISTORY OF SIWES
In the earlier stage of science and technology education in Nigeria, students were graduating
from their respective institution without any technical knowledge or working experience. It
was in this view that students undergoing science and technology related courses in different
institutions were mandated for SIWES in the view of widening their horizons so as to enable
them have technical knowledge or working experience before graduating from their various
institutions.
The Student Industrial Work Experience Scheme (SIWES) was established by the Industrial
Training Fund (ITF) in 1973 to enable students of tertiary institutions have basic technical
knowledge of industrial work based on their course of study before the completion of their
program in their respective institutions. The scheme was designed to expose students to
industrial environment and enable them develop occupational competencies so that they can
readily contribute their quota to national economic and technological development after
graduation. The major benefit accruing to students who participate conscientiously in
student’s industrial work experience scheme are the skills and competencies they acquire.
The relevant production skills remain part of the recipients of Industrial Training as lifelong
assets which cannot be taken away from them. This is because the knowledge and skill
acquired through training are internalized and become relevant when required to perform jobs
or functions.
In connection to supervision, when an understudy has been sent by the colleges, schools or
polytechnics as the case might be for industrial Attachment, supervisors from the individual
schools are sent to assess the understudy and affirm that the understudy is entirely industrial
connection and furthermore that the understudy is not kidding with his/her SIWES exercises.
Industry-based bosses additionally help to screen the understudies in such manner.
1
d) Make from the university to the world of work easier, and thus enhance
student’s contacts for later job placement.
e) Provide students with the opportunity to apply their theoretical knowledge in
real work situation, thereby bridging the gap between university work and
actual practice.
f) Enlist and strengthen employer’s involvement in the entire educational process
of preparing university graduates for employment in industry.
2
MANAGING DIRECTOR
CENTER MANAGER
3
CHAPTER TWO
Web development is the building, creating, and maintenance of websites. It is the work that
happens behind the scenes in order to develop a website and make it look great, work fast and
perform well with a seamless user experience. It includes aspects such as web design, web
publishing, web programming, and database management.
Web design is the skills and discipline of production and maintenance of websites which
include interface design, page coding, hosting and search engine optimization.
Web developers do this by using a variety of coding languages. The languages they use
depends on the types of tasks they are preforming and the platforms on which they are
working. Web development skills are in high demand worldwide and well paid too – making
development a great career option. It is one of the easiest accessible higher paid fields as you
do not need a traditional university degree to become qualified.
The field of web development is generally broken down into front-end (the client side) and
back-end (the server side) and Dev. OP’s (development operations)
A website is not the same thing as a Web page. Though the two terms are often used
interchangeably, they should not be. So, what's the difference? To put it simply, a Web site is
a collection of web pages while a Web page is an individual HTML document which makes
up the World Wide Web.
Static Webpage: A static webpage also known as flat or stationary page is one that does
not change when a site visitor requests it. They show the same content each time they are
viewed.
4
2.2.2 STEPS IN STATIC WEB PAGE PROCESS
Dynamic Webpage: Dynamic pages have contents that can change each time they are
accessed. It is modified by the server before it is sent to the requesting browser. These
pages are typically written in scripting languages.
Step 3: Application server scans page for instructions and finishes page.
5
WORD PROCESSOR GRAPHIC APPLICATIONS HTML EDITOR
Code
6
CHAPTER THREE
The front end also called “client-side” programming is what happens in the browser. It’s
everything the user sees and interacts with.
A front-end development takes care of layout, design and interactivity using HTML, CSS and
JavaScript. They take an idea from the drawing board and turn it into reality. What you see
and what you use, such as the visual aspect of the website, the drop-down menus and the text,
are all brought together by the front-end developer, who writes a series of programs to bind
and structure the elements, make them look good and add interactivity. These programs are
run through a browser.
Back in the day, websites were simple, static text sites with a bit of formatting and maybe
even some animation.
It’s important to note that front-end development has changed significantly over the past 10 to
15 years with the explosive growth of new programming and scripting languages, which
wasn’t as ubiquitous on the front end as it is now, or even as common on the back end.
7
3.3 HTML (HYPERTEXT MARKUP LANGUAGE)
HTML stands for Hyper Text Markup Language. It is the standard markup language for
creating Web pages. HTML is how every site on the web is organized, so it’s a big one you
can’t live without in front-end development.
In HTML it is the tags that are the markup. The special meaning these tags give is a
description of the structure of the document. For example, the opening paragraph tag says
“This is the beginning of a paragraph” and the closing tag says “This is the end of the
paragraph.” Without the markup, the words in the middle would just be another bit of text; it
would not be clear that they formed a paragraph. HTML consists of a series of elements that
describes the structure of a Web page. These elements tell the browser how to display the
content. HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.
The html elements have attributes which describes the element. The attributes are added on
the opening tag and each has a name and value.
The name is the property you want to set and the value is what you want the value of the
property to be.
Example: the <font> element has size, face, color as attributes with different values. The
values should be enclosed in double quotation marks.
8
TAGS DESCRIPTION
9
3.5 CSS (CASCADING STYLE SHEET)
CSS stands for Cascading Style Sheets. It is a language designed to specify the style, layout,
and appearance of various elements on webpages. CSS covers fonts, colors, margins, lines,
height, width, background images, advanced positions and many other things.
Cascading Style Sheets (CSS) is how developers add styling and effects to a website. Styles
can be added globally, then layered on without changing that fundamental styling that gets
applied to a whole site.
It allows one to adapt the presentation to different types of devices, such as large screens,
small screens, or printers. The separation of HTML from CSS makes it easier to maintain
sites, share style sheets across pages, and tailor pages to different environments.
Many front-end developers use a CSS preprocessor to make writing lots of lines of CSS even
faster.
In its simplest form, a CSS framework is a collection of CSS stylesheets that are prepped and
ready to use. They’re tailored for use in common situations, like setting up navbars, and are
often expanded upon by other technologies such as SASS and JavaScript. Basically, all you
need to do is writeup your HTML with the appropriate structure, classes, and IDs and you’re
off to the races. However, instead of that stylesheet being specifically for the home page
you’re working on, it’s ready to accommodate a general “standard” of home page, having
classes for things commonly found on other home pages (i.e. navbar, footer, slider, hamburger
menu, 3 column layout). This allows you to quickly setup web pages without having to deep
dive into some CSS, saving a bunch of time.
10
Type selector: Selects all elements that match the given node name.
Class selector: Selects all elements that have the given class attribute.
Syntax: .classname {………}
Example: .index will match any element that has a class of "index", .classname
{………}
ID selector: Selects an element based on the value of its id attribute. There should be
only one element with a given ID in a document.
Syntax:#idname
Example: #toc will match the element that has the ID "toc", #toc {……}
Attribute selector: Selects elements based on the value of the given attribute.
Syntax: [attr][attr=value] [attr~=value] [attr|=value] [attr^=value] [attr$=value]
[attr*=value]
Example: [autoplay] will match all elements that have the autoplay attribute set (to any
value) /* <a> elements with a title attribute */
a[title] {
color: purple;
}
2. Combinators:
Adjacent sibling combinator : The + combinator selects adjacent siblings. This means
that the second element directly follows the first, and both share the same parent.
Syntax:A+B
Example: h2 + p will match all <p> elements that directly follow an <h2>.
11
/* Paragraphs that come immediately after any image */
img + p {
font-style: bold;
}
General sibling combinator : The general sibling combinator selects siblings. This
means that the second element follows the first (though not necessarily immediately),
and both share the same parent. It is denoted by” ~”.
Syntax:A~B
Example: p ~ span will match all <span> elements that follow a <p>.
/* Paragraphs that are siblings of and subsequent to any image */
img ~ p {
color: red;
}
Child combinator: The child combinator selects nodes that are direct children of the
first element. It is denoted by” >”.
Syntax: A > B
Example: ul > li will match all <li> elements that are nested directly inside a <ul>
element.
/* List items that are children of the "my-things" list */
ul.my.things>li{
margin:2px;
}
Descendant combinator: This combinator selects nodes that are descendants of the first
element. It id denoted by a space “ ”.
Syntax: A B
Example: div span will match all <span> elements that are inside a <div> element.
/* List items that are descendants of the "my-things" list */
ul.my-things li {
margin: 2px;
}
12
Pseudo-classes: Pseudo-classes allow the selection of elements based on state
information that is not contained in the document tree.
Example: a:visited will match all <a> elements that have been visited by the user.
div:hover {
background-color: #F89B4D;
}
CSS properties are used to apply styles to structured document, such as those created with
HTML or XML.
CSS properties are specified in the CSS standard. Each property has a set of possible values.
Some properties can affect any type of element and others apply only to particular groups of
elements.
CSS properties are used within a declaration block with a corresponding value.
CSS properties can be generally classified into four groups:
1. Text properties.
2. List properties.
3. Font properties.
4. Border properties.
13
PROPERTIES DESCRIPTION VALUES
TEXT PROPERTIES
color Sets the color of a text RGB, hex, keyword
text align Aligns the text in an element left, right, center, justify
LIST PROPERTIES
list-style Sets all the properties for a list in one list-style-type, list-style-
declaration position, list-style-image, inherit
list-style-type Specifies the type of list-item marker none, disc, circle, square,
decimal, decimal-leading-zero
list-style-image Specifies an image as the list-item URL, none, inherit
marker
BORDER PROPERTIES
14
Table 3.8.1: CSS Properties
CHAPTER FOUR
The backend of the web consists of the server that hosts the website, an application for
running it and a database to contain the data. The backend developers uses computer
programs to ensure that the server, the application and the database runs smoothly together.
This type of development need to analyze what a company’s needs and provide efficient
programming solutions.
Backend web development lays the foundational code that enables websites to process the
actions that users take on the front end and deliver the correct information in return.
Backend programming can either be object-oriented (OOP) or functional. The former is the
technique that focuses on the creation of objects. With object-oriented programming,
statements should be executed in a particular order. Popular OOP languages are Java, PHP,
JavaScript and Python. Languages can either be statically typed or dynamically typed.
4.3 PHP
15
PHP is a recursive acronym for "PHP: Hypertext Preprocessor". PHP is a server side
scripting language that is used to manage dynamic content, databases, session tracking, etc.
The language was first released in 1995 when there were few options for building dynamic
websites. It is integrated with a number of popular databases, including MySQL, Oracle,
Sybase, and Microsoft SQL Server. The syntax for Php is <? Php……..?>
1. PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
2. It can handle forms, i.e. gather data from files, save data to a file, through email you
can send data, return data to the user.
3. You can add, delete, modify elements within your database through PHP.
4. Access cookie variables and set cookies.
5. Using PHP, you can restrict users to access some pages of your website.
6. It can encrypt data.
In order to develop and run PHP Web pages three vital components need to be installed on
your computer system. These components are:
Web Server
Database
Php Parser
Php powers 78.2% of all websites whose server-side programming language we know. The
language was first released in 1995 when there were few options for building dynamic
websites. Since PHP is dynamically typed, it means you’re able to come up with a variety of
solutions and workarounds for one problem. It also means that the same bit of code can mean
something different depending on the context, which makes programs written in PHP tricky
to scale and sometimes slow to run.
PHP is a great language to learn for those who are just starting out for a number of reasons:
16
1. It’s more forgiving of errors, which means that you’re able to compile and run a
program until you reach a problematic part.
2. There is an abundance of resources dedicated to the language as a result of the large
community and tool support. The language undergoes updates, so ensure you’re
learning from an up-to-date tutorial.
A comment is the portion of a program that exists only for the human reader and stripped out
before displaying the programs result. There are two commenting formats in PHP:
1. Single-line comments: They are generally used for short explanations or notes
relevant to the local code. e.g. #,//
2. Multi-lines comments: They are generally used to provide pseudocode algorithms
and more detailed explanations when necessary. The multiline style of commenting is
the same as in C. e.g. /* ............*/
4.4 PHP VARIABLES
A variable is a memory location which contains some known or unknown values. The value
of a variable can change within a program.
Scope can be defined as the range of availability a variable has to the program in which it is
declared. PHP variables can be one of four scope types:
17
1. Local Variables: A variable declared in a function is considered local, i.e. it can be 9
referenced solely in that function. Note that any assignment outside of that function
will be considered to be entirely different variable from the one contained in the
function.
$x = 4;
function assignx () {
$x = 0;
echo "x inside function is $x";
}
assignx();
echo "x outside of function is $x";
$somevar = 15;
function addit() {
GLOBAL $somevar;
$somevar++;
addit();
3. Static Variables: The final type of variable is known as static. In contrast to the
variables declared as function parameters, which are destroyed on the function's exit,
a static variable will not lose its value when the function exits and will still hold that
18
value should the function be called again. You can declare a variable to be static
simply by placing the keyword STATIC in front of the variable name.
Example i:
function keep_track() {
STATIC $count = 0;
$count++;
echo $count;
}
keep_track();
keep_track();
keep_track();
Example ii:
<form action=“process.php" method="POST">
<p>
Username
<input name="username" type="text"/>
</p>
<p>Password
<input name="password" type="password" />
</p>
<p>
<label for="button"></label>
<input type="submit" name="submit" id="button"
value=“register" />
</p>
</form>
if(isset($_POST['submit'])) {
$username = $_POST[“username"];
$password = $_POST[“password”];
}else{
19
echo “unable to register”;
The main way to store information in the middle of a PHP program is by using a variable. The 7
important thing to know about variable in PHP includes:
1. All variable in PHP are denoted with a leading dollar sign ($).
2. The value of a variable is the value of its most recent assignment.
3. Variables are assigned with the = operator, with the variable on the left hand side and
the expression to be evaluated on the right.
4. Variables can, but do not need, to be declared before assignment.
5. Variables in PHP do not have intrinsic type – a variable does not know in advance
whether it will be used to store a number or a string of characters.
6. Variables used before they are assigned have default values.
7. PHP does a good job of automatically converting types from one to another when
necessary.
20
$this->model = "2.2";
$this->type = "suv";
}
}
$camry = new Car();
echo $camry->model;
echo $camry->type;
?>
b. Arrays: are named and indexed collections of other values. An array stores
multiple values in one single variable.
Example:
<? php
$names = array("Chukwudum", "Ifechukwu", "Favour");
echo($names);
?>
3. Special data types
Resources: are special variables that hold references to resources external to
PHP (such as database connections).
NULL: is a special type that only has one value: NULL.
1. Arithmetic Operators
Example:
-$a => Negation => Opposite of $a.
$a + $b => Addition => Sum of $a and $b.
$a - $b => Subtraction => Difference of $a and $b.
$a * $b => Multiplication => Product of $a and $b.
$a / $b => Division => Quotient of $a and $b.
$a % $b => Modulus => Remainder of $a divided by $b.
$a**$b=> Result of raising $a to the $b'th power.
21
2. Increment/Decrement Operators
Example:
3. Comparison Operators
Example:
$a == $b => Equal
$a === $b => Identical
$a != $b => Not equal
$a !== $b => Not identical
$a < $b => Less than
$a > $b => Greater than
$a <= $b => Less than or equal to
$a >= $b => Greater than or equal to
5. Assignment Operators
Example:
$a=$b => $a=$b $a is equal to $b
$a + =$b =>$a=$a+$b $a is Sum of $a and $b.
22
$a - =$b =>$a=$a-$b $a is Difference of $a and $b.
$a *=$b =>$a=$a*$b $a is Product of $a and $b.
$a /=$b =>$a=$a/$b $a is quotient of $a and $b.
$a %=$b =>$a=$a%$b $a is Modulus of $a and $b.
6. Conditional Operators
1. Built-in
2. User defined
1. String Functions
strlen :counts the no of characters including space.
$result = "obi is a boy.";
echo strlen($result);
substr :reduces the no of characters to displaced
$result = "obi is a boy";
echo substr($result,0,3);
str_split :converts the value of the variable to array
$result = "obi is a boy";
$a= str_split($result,3);
print_r($a);
ucfirst :converts the first character of the value to capital letter
$result = "fight daily";
echo ucfirst($result);
ucwords :converts the first character of each word to capital letter
$result = "obi";
echo ucwords($result);
strtolower :converts the letters in capital to small letters
23
$result= "DAILY";
echo strtolower($result);
strtoupper :converts everything to capital
$result = "daily";
echo strtoupper($result);
strpos :shows the position number of a letter in a variable. It starts counting
from "0‘
$result = "obtexdt";
echo strpos($result,"t");
2. Math Functions
3. String Concatenation Functions
4. Include Functions
5. Date Functions
1. Function Definition
2. Function Argument
3. Returning Values
4. Variable Functions
4.8 MYSQL
MySQL is one of the most recognizable technologies in the modern big data ecosystem.
Often called the most popular database and currently enjoying widespread, effective use
regardless of industry, it’s clear that anyone involved with enterprise data or general IT
should at least aim for a basic familiarity of MySQL.
With MySQL, even those new to relational systems can immediately build fast, powerful, and
secure data storage systems. MySQL’s programmatic syntax and interfaces are also perfect
gateways into the wide world of other popular query languages and structured data stores.
24
software stacks for building and maintaining everything from customer-facing web
applications to powerful services. Its opensource nature, stability, and rich feature set, paired
with ongoing development and support from Oracle, have meant that internet-critical
organizations such as Facebook, Twitter, Wikipedia, and YouTube all employ MySQL
backends.
4.8.2 XAMPP
Xampp Server: XAMPP is a free and open-source cross-platform web server solution stack
package developed by Apache Friends, consisting mainly of the Apache HTTP Server,
MariaDB database, and interpreters for scripts written in the PHP and Perl programming
languages.
4.8.3 PHPMYADMIN
PhpMyAdmin is a free software tool written in PHP, intended to handle the administration
of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and
MariaDB. Frequently used operations (managing databases, tables, columns, relations,
indexes, users, permissions, etc.) can be performed via the user interface, while you still have
the ability to directly execute any SQL statement.
25
Fig. 4.8.3.1 PhpMyAdmin
26
4.8.4 CONNECTING PHP TO MYSQL
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
// Check connection
if ($conn->connect_error) {
<?php
$host = “localhost”;
$username = “root”;
$password = ‘’”;
$databasename = “database_name”;
?>
} else {
<?php
require_once "connect.php";
if (!$conn) {
die('Could not connect: ' . mysqli_error());
}
$firstname = mysqli_real_escape_string($conn,$_POST['firstname']);
$middlename =mysqli_real_escape_string($conn,$_POST['middlename']);
$surname =mysqli_real_escape_string($conn,$_POST['surname']);
$day = $_POST["day"];
$month = $_POST["month"];
$year = $_POST["year"];
$date_of_birth =$day."/".$month."/".$year;
$date=mysqli_real_escape_string($conn,$_POST['date']);
$feedback=mysqli_real_escape_string($conn,$_POST['feedback']);
$phone=mysqli_real_escape_string($conn,$_POST['phone']);
$picture_ref = basename($_FILES["picture_ref"]["name"]);{
$target_path = "images/";
$target_path = $target_path . basename( $_FILES["picture_ref"]["name"]);
if(move_uploaded_file($_FILES['picture_ref']['tmp_name'], $target_path) )
}
mysqli_select_db($conn,"beni");
28
mysqli_select_db($conn,"beni");
$sql="INSERT INTO studentinfom(firstname, middlename,surname,date_of_birth,feedback,
phone,picture_ref) VALUES ('$firstname','$middlename','$surname','$date_of_birth',
'$feedback','$phone','$picture_ref')";
if (!mysqli_query($conn,$sql))
{
die('Error: ' . mysqli_error());
} else {
echo "Your Form has been successfully Submitted----Thanks!";
}
mysqli_close($conn);
?>
<?php
$host = "localhost";
$user = "root";
$password = "";
Echo;
$id_del=$_GET["id"];
if ($result) {
29
echo "The selected user has been successfully Deleted----Thanks!";
die(); }
mysqli_close($conn);
?>
30
PROJECT CREATED
31
32
PLATE 2: SCREENSHOT OF SAMPLE CODE
33
PLATE 3: SCREENSHOT OF SAMPLE CODE
CHAPTER FIVE
34
CONCLUSION
In conclusion, I want to use this medium to commend the Federal Government of Nigeria,
National University Commission (NUC), Students Industrial Work Experience Scheme
(SIWES) unit for their support which is geared towards making students to obtain the
relevant industrial-based training and work experience necessary in their chosen professions
before leaving the higher institution. SIWES helps students and members of the academic
community to effectively utilize the resources of the industrial training experience.
35
I suggest that schools involved in the students industrial work experience scheme (SIWES)
should continue to encourage and give more support to the students so as to enable them
acquire the necessary knowledge and skills required for their various professions.
I also suggest that industries should have industry-based IT coordinator who sees to it that
students get the best of training relevant in their course of study. The IT coordinator should
also ensure that students are allowed to use the resources of the industry.
Finally, I suggest that the university system should encourage industries and the societies at
large to accept students embarking on industrial attachment.
36