Software Engineeirng Lab Manual
Software Engineeirng Lab Manual
Week Required
Lab Date Objective
No. Reading
10-10-2022
Construct Gantt Chart & PERT Chart Using “MS
1 to 1-14
PROJECT”
14-10-2022
17-10-2022
Demonstrate Unified Modeling Language
2 to 15-19
Diagrams And “Rational Rose”
21-10-2022
24-10-2022 Illustrate Use Case Diagram Using “Rational
3 to Rose” 20-23
28-10-2022
31-11-2022
Illustrate Sequence Diagram Using “Rational
4 to 24-30
Rose”
04-11-2022
07-11-2022
Apply Web Development Framework Using
5 to 31-50
“Dreamweaver CS 5”
11-11-2022
14-11-2022
6 Apply Web Development Client Side Scripting
to 51-63
HTML, Login Form, CSS And Java Scripting
18-11-2022
21-11-2022 Open Ended Lab(Utilize Gantt Chart, Network
7 to Diagram, Use Case Diagram, Login Form & CSS
25-11-2022 Style on Project Management System).
28-11-2022
8 to Implement Server Site Scripting On MY SQL. 64-79
02-12-2022
Midterm Examination
9 (05-12-2022 to 10-12-2022)
12-12-2022
Show Authentication using PHP, Query,
10 to 80-89
Database.
16-12-2022
19-12-2022
Use Dreamweaver Web Development tool to
11 to 90-94
View Record
23-12-2022
20-12-2021
Use Dreamweaver Web Development tool to Edit
12 to 95-101
Record
25-12-2021
02-01-2023
Use Dreamweaver Web Development tool to
13 to 102-109
Insert/Delete Record
06-01-2023
09-01-2023
14 Demonstrate & Practice Software Requirement
to 110-114
Specification
13-01-2023
16-01-2023 Open Ended Lab(Using Login Form, add fields in
to database ,implement authentication & design
15 20-01-2023 menu including ADD, EDIT, DELETE & VIEW
records on any system).
23-01-2023 Lab Examination
16 to (23-01-2023 to 11-02-2023)
27-01-2023
SSUET/QR/118
(Form IIa)
Sir Syed University of Engineering & Technology, Karachi
Computer Engineering Department
Rubric Guideline for Software Based Lab
Project report has Project report Project report Project report has
no grammatical has very few has multiple several
and/ or spelling grammatical/ grammatical/ grammatical/
Project Report errors. spelling errors. spelling errors. spelling errors and
All sections of the All sections of Few sections of sentence
report are very the report are the report construction is
well-written and technically contains poor.
technically accurate. technical errors.
accurate.
Laboratory Manual
Lab Exam
Total (50)
TABLE OF CONTENTS
Lab Objectives Page Corresponding
No. No. CLOs
1 Construct Gantt Chart & PERT Chart Using “MS PROJECT” 1 CLO_1
Apply Web Development Client Side Scripting HTML, Login Form, CSS And Java 15 CLO_2
6 Scripting
7 Open Ended Lab(Utilize Gantt Chart, Network Diagram, Use Case Diagram, Login Form & CSS
Style on Project Management System).
8 Implement Server Site Scripting On MY SQL. 19 CLO_2
43 CLO_2
11 Use Dreamweaver Web Development tool to Edit Record
14 Open Ended Lab(Using Login Form, add fields in database ,implement authentication
& design menu including ADD, EDIT, DELETE & VIEW records on any system).
Lab # 1: Creating Gantt Chart & PERT Chart Using “MS PROJECT” SSUET/QR/114
Lab#01
Features:
Project creates budgets based on assignment work and resource rates. As resources are
assigned to tasks and assignment work estimated, the program calculates the cost, equal to the
work times the rate, which rolls up to the task level and then to any summary tasks and
finally to the project level. Resource definitions (people, equipment and materials) can be
shared between projects using a shared resource pool. Each resource can have its own
calendar, which defines what days and shifts a resource is available. Resource rates are used
to calculate resource assignment costs which are rolled up and summarized at the resource
level. Each resource can be assigned to multiple tasks in multiple plans and each task can be
assigned multiple resources, and the application schedules task work based on the resource
availability as defined in the resource calendars. All resources can be defined in label without
limit. Therefore, it cannot determine how many finished products can be produced with a
given amount of raw materials. This makes Microsoft Project unsuitable for solving problems
of available materials constrained production. Additional software is necessary to manage a
complex facility that produces physical goods.
The application creates critical path schedules, and critical chain and event chain
methodology third-party add-ons also are available. Schedules can be resource leveled, and
chains are visualized in a Gantt chart. Additionally, Microsoft Project can recognize different
classes of users. These different classes of users can have differing access levels to projects,
views, and other data. Custom objects such as calendars, views, tables, filters, and fields are
stored in an enterprise global which is shared by all users.
A Gantt chart, commonly used in project management, is one of the most popular and useful
ways of showing activities (tasks or events) displayed against time. On the left of the chart is
a list of the activities and along the top is a suitable time scale. Each activity is represented by
a bar; the position and length of the bar reflects the start date, duration and end date of the
activity.
A Gantt chart is a type of bar chart, developed by Henry Gantt in the 1910s, that illustrates a project
schedule. Gantt charts illustrate the start and finish dates of the terminal elements and summary
elements of a project. Terminal elements and summary elements comprise the work breakdown
structure of the project. Modern Gantt charts also show the dependency (i.e., precedence network)
relationships between activities.
To summarize, a Gantt chart shows you what has to be done (the activities) and when (the
schedule).
Each task shown in the box called node and a line connecting two boxes represents the
dependency between those tasks.
You can also create new tasks in the Network Diagram. It’s always easy to manage the tasks
from Gantt chart view, but if you are concerns on view the dependencies instantly while you
creating the tasks, Network Diagram will be the right one.
If the task is completed, the task node shows cross diagonal lines
If the task is in progress but not completed, a single diagonal line draw through node
No diagonal line appears in tasks that are not yet started
In the Duration field, type the amount of time each task will take in months, weeks,
days, hours, or minutes, not counting nonworking time. (By default the time period
will be days, but that can be changed to hours, months, etc.)
Press ENTER. It should look like the figure below:
To add a milestone the only difference is that the duration of the activity must be zero
(below is an example):
Note: By double clicking on a Task or milestone, you can modify its information with
a form that prompts
Outlining helps organize your tasks into more manageable chunks. You can indent related
tasks under a more general task, creating a hierarchy. The general tasks are called summary
tasks; the indented tasks below the summary task are subtasks. A summary task's start and
finish dates are determined by the start and finish dates of its earliest and latest subtasks.
Click once on the first activity of the group of activities you want to group. For the
example Activities 4and 5
Then click on the option “New Task” in the “Insert” Menu to insert a new task that
will represent thename of the group (“Group 1” for this example)
Then select the tasks below (4 and 5) and then click in the option “Indent” in the
“Project
A network of tasks in a project must be connecting activities from the start to the end, to
establish these relationships we need to use the field “Predecessors” of each task, where we
can designate which activity will be preceding the one we are updating, in the example below
we will indicate MS project that “Activity 5” can start once “Activity 4” is completed
(Finish to Start relationship).
Notice that by establishing the relationship now the Group 1 takes 2 days to be completed,
because before, the activities were set to be performed in parallel, and now they are in series
(Finish to Start relationship)
Note: MS project will calculate dates based on the durations of the tasks, their relationships
and the start date set for the project, however it is possible to change the starting date of a
task (if necessary) By double clicking on a Task or milestone, and using the fields related to
the dates (Start or Finish)
You can use the Resource Sheet in Microsoft Project to create a list of the people, equipment,
and material resources that make up your team and carry out the project tasks. Your resource
list will consist of work resources or material resources. Work resources are people or
equipment; material resources are consumable materials or supplies, such as concrete, wood,
or nails.
On the View menu, click Resource Sheet.
On the View menu, point to Table, and then click Entry.
In the Resource Name field, type a resource name.
You can go through the fields in the sheet, but for the simplicity of the example just
focus on the name and initials of the Resource
Below is an example of some Human resources added to the Resource Sheet (We
could add also other type of resources such as Equipments, Consumables, etc.)
Once the resources are created, you can go back to the View menu, and click Gantt
Chart to see again the tasks, and then when you double click a task you can add a
resource to this task by using the tab “Resources”
Network Diagram:
Click Gantt chart view and go to the sub options in Gantt Chart
Click Network diagram
Now let’s try a small example, step by step to practice each of the options we have seen so far
about how to create a project using MS Project. We are going to use a small set of tasks
(Table Below) related to the initial phases of a System Testing Plan (Definition and Design)
8. Review Test Plan and Activity 7 •Test Manager 2 days Design Phase
Attachments •Test Leader
•Tester E
Check that System is Activity 8 •Tester E, A and B 1 days Design Phase
Ready to be tested
10. Add Design Activity 9 •Test Leader 1 days Design Phase
Documents to CMS •Tester E, A and B
(Milestone)
Adding Task:
Write the name of each task in the spreadsheet using the column “Task Name”
Write the duration in days of each task in the spreadsheet using the column
“Duration”
Group the tasks by the Phase according to the table of tasks shown before, and add a
group that encloses the phases named “System Testing Plan MCY-ADTT-ST-2002-
01” this will represent the plan as a whole
Write the predecessors of each task in the spreadsheet using the column
“Predecessors” (If you can’t see the column, try to expand the vertical bar that
divides the spreadsheet to the Gantt Chart)
To convert a Task in a Milestone, just double click the Task and go to the tab
“Advanced” then check the box that says “Mark Task as a Milestone”
Grouping:
Insert a new task at the beginning that will group everything. Highlight the tasks that
are going to be added as subtasks and use ‘Indent’ option.
The final result should look like this, now repeat this steps to create the Subgroups that will
represent the phases (Definition and Design).
Insert a new task at the beginning of the definition tasks. Highlight the tasks that are
going to be added as subtasks.
The final result should look like this, now repeat this steps to create the Subgroup that will
represent the phase “Design
Insert a new task at the beginning of the Design tasks. Highlight the tasks that are
going to be added as subtasks in the design phase and then Click on the option
‘Indent’
Add Resource:
Assign Resources:
Double click the task you want to link to resources available in the “Resource Sheet”
Then got to the Tab “Resources” and look up the resources you want to relate to the
activity (For the example let’s keep the amount of effort of each Resources as 100%,
Leveling Resources won’t be covered in this tutorial), finally Click the “Ok” button to
finish the assignment.
Repeat steps 1 and 2 for the rest of the tasks.
We can show more information, related to the tasks, in the spreadsheet, one column
that might be of general interest is the cost, to do this first perform a Right Click on
top of the spread sheet (Specifically In the titles of the Columns), a pop-up menu
should appear showing several options, chose the one that says “Insert Column”
2. Then lookup the column named “Cost” and then press the “Ok” button
As explained before, you can add and hide columns from the Spread sheet, this lets you show
exactly what the people needs to see, below is a view with selected fields: Name, Cost,
Duration, Resource initials and Start Date. The reader is welcome to experiment with this
features and to explore more views that are offered by MS Project, such as resources usage,
cost reports, etc.
Exercise:
Create Gantt Chart and Network Diagram in Microsoft Project with above mention projects.
Social website like (Facebook, Twitteretc.)
Hospital Management System
Faculty Management System
Lab # 2
Rational Rose is a set of visual modeling tools for development of object oriented software.
Rose Enterprise
Rose GUI
Standard Toolbar
Diagram Toolbox
Browser
Diagram Window
Documentation Window
Specifications
Log Window
Getting Started with Rational Rose Development Software
Click on Start, Programs, Rational Suit Development, and then on Rational Rose 2000
Enterprise Edition (not the one that has the arrow next to it).
You will now see a window appearing that says “Create New Model”. This is for working
with Java, Oracle, and VB, just press “Cancel”.
Next you see the main window called “Rational Rose [untitled]” and a smaller window within
it called “Class Diagram: Logic View/ Main”. The First diagram you will be working on is a
use case diagram.
Toolbar
The standard toolbar is displayed directly under the menu bar, along the top of the application
window. This toolbar is independent of the open diagram window.
The following icons are available for use on the standard toolbar, independent of the open
diagram window.
Standard Toolbar
Cut
Clicking the Cut icon removes icons from your model. Element(s) must be selected to activate
the icon. Cutting an element will also cut associated relationships. You can cut multiple
selected items.
Copy
Clicking the Copy icon copies an element to a new location on the same model, or to a new
model, without affecting the original model.
Paste
Clicking the Paste icon pastes a previously cut or copied element to the clipboard onto another
location.
Print Diagrams
Clicking the Print icon prints diagrams to the default printer.
View Documentation
Clicking the View Documentation icon displays the documentation window on the diagram.
Browse Parent
Clicking the Browse Parent icon displays the "parent" of the selected diagram or specification.
If you have a specification selected, the specification for the parent of the "named" item is
displayed.
Zoom In
Clicking the Zoom In icon magnifies the current diagram to view an area in detail.
Zoom Out
Clicking the Zoom Out icon minimizes the current diagram allowing you to "pull back" to
view more information.
Fit in Window
Clicking the Fit In Window icon centers and displays any diagram within the limits of the
window. This command changes the zoom factor so that the entire diagram shows.
Any element of a diagram can be created by placing the mouse pointer over a Tool in the Toolbar and Drag &
Drop over the diagram canvas.
Text Realization
Note Interface
Pointer Class Association Generalization
Note Anchor Package
Dependency or instantiation
Association
class
Diagram Toolbox
Bowser
Window
Diagram Window
Your Model is
Really in
HERE!
Documentation Window
Log Window
Exercise:
Lab # 3
Use-case diagrams present a high-level view of system usage as viewed from an outsider's
(actor's) perspective.
These diagrams show the functionality of a system or a class and how the system interacts with
the outside world.
Use-case diagrams can be used during analysis to capture the system requirements and to
understand how the system should work.
During the design phase, use-case diagrams specify the behavior of the system as implemented.
1. In the Window on the left side click on the "+" (plus) sign next to "Use Case View"
2. In the same window, double click on the icon next to "Main". This will open a blank
Use Case diagram called "Main"
Adding an Actor
1. To create an Actor, click on the stick figure icon located on the toolbar in the middle of
the screen. Then click on the diagram to place the Actor.
2. Open the Actor's specification by right clicking on the Actor (in the diagram) and select
"Specification" from the pop-up menu. Fill in applicable fields. The specification can
also be brought up by double clicking on the actor.
1. In the toolbar, click on the oval shaped icon then click on the open diagram to place the
use case.
2. Bring up the specification and fill in appropriate fields.
Adding an Association
1. Click on the association icon (a solid line with no arrowheads). Then, click on the actor
first then the use case. An association (line) will be drawn between the two.
Using the Main Menu Bar (top of the screen) follow these steps:
a. Click on "Tools"
b. Click on "Options"
c. Click on the "Toolbars" tab Note that different diagrams have different toolbars
associated with them. You can add/remove buttons for each type of tools bar.
d. Click on the button with "..." in it next to the name of the diagram toolbar you
want to alter.
e. The window that appears will allow you to add/remove buttons.
Exercise:
Q1: Draw a use case diagram of the stated scenario: A user has all the rights of login to a
catalog management website browse the catalog and view products. Similarly, the
administrator of that website has all the rights that a user has but in addition to that
administrator has other rights too that include Logout, create product, edit product and to
delete product. Find out the actors and relation of actor or actors to the use cases.
Note: Show the relevant association of actors with the use cases.
State the Actors and Use Cases of the above stated scenario and describe briefly the
dependencies between them.
Q2: At the start of each semester a student can request a prospectus containing a course list.
Information about a course is provided, such as the tutor, department and pre-requisites.
The new system will allow students to create a schedule, then select four courses. Each
student chooses two others in case their first choices become full or are cancelled. No
course can have more than 10 students. No course can have less than 3 students or it will
be cancelled. This will be the same functionality as available to other internal users of
the system. When registration is complete, the registration system sends a message to the
billing system to send out a bill to the student.
Tutors use the system to find which classes they are teaching and who the students are.
The
registrar will administer the system.
For a period at the beginning of the semester the student can change their schedule.
Students must be allowed to access the system during this time to add or delete courses.
Identify the Actors, Use Cases and Association of the given scenario.
Q3: For the hospital Management System, a general example is shown below.
Here for the Billing Section we have considered Patient Billing and Discharge
billing as separate, as the Patient might not be admitted and is charged for only
counseling.
Lab # 4
Objective: Illustrate Sequence Diagram Using “Rational Rose”
1. Make sure the Collaboration diagram is the active diagram. (If you've been doing the
examples in order, it should already be active)
2. Hit the "F5" key (the single key labeled 'F5').
Rose generates the Sequence diagram based on the Collaboration diagram. The reverse can
be done as well. A Collaboration diagram can be generated from a Sequence diagram by
hitting the 'F5' key.
Sequence diagrams are sometimes called event diagrams, event scenarios, and timing
diagrams.
Class roles describe the way an object will behave in context. Use the UML object symbol to
illustrate class roles, but don't list object attributes.
Activation
Messages
Messages are arrows that represent communication between objects. Use half-arrowed lines
to represent asynchronous messages. Asynchronous messages are sent from an object that
will not wait for a response from the receiver before continuing its tasks.
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the condition
for exiting the loop at the bottom left corner in square brackets [].
Destroying Objects
Objects can be terminated early using an arrow labeled "<< destroy >>" that points to an X.
Exercise
There is a volume of students renting books from the library. To regulate this, it’s
essential for students to have online access to the record of available books. This system
sequence diagram example is just made for this purpose. Also, the system will also
inform the student if they exceeded the allotted time for renting a book and a penalty
will apply accordingly.
Lab # 5
Objective: Apply Web Development Framework Using “Dreamweaver CS 5”
1. To understand Web Development Technologies i.e. Open and Close Source
Technologies.
2. To understand Client - Server Architecture
3. To understand the Software Architecture or Architecture of a Web Based Application.
4. To learn Web Development by making a web page for User Side Scripting using
“HTML” for Login purpose.
Theory:
In this lab we are going to understand Web development (open/ close source technologies to be
used) its architecture and developing a frame based website (understanding html tags Frame set and
Table to form a form object Input type.
Objective No. 1:
To understand Web Development Technologies i.e. Open and Close Source Technologies.
XAMPP:
Xampp is an open source and free software. It is actually a cross platform web server package.
XAMPP is short for:
X: Cross Platform
A: APACHE Server
M: MySQL
P: PHP
P: Perl
APACHE:
APACHE is a public domain open source Web server. Apache is generally recognized as the world's
most popular Web server (HTTP server), originally designed for UNIX environments. Apache
HTTP Server is an established standard in the online distribution of website services, which gave
the initial boost for the expansion of the World Wide Web.
There is a great amount of modules created especially for the Apache server, which support
various scripts and allow dynamic content to be run on the server.
Checking the service of XAMPP:
Open your web browser and type http://localhost, a XAMPP page will appear
If the page does not open, go to the Xampp folder, go to xampp_control and start Apache
and MySQL if not running
Then type http://localhost in your browser
Xampp page will be loaded
Checking the location of htdocs:
Go to the drive where you installed Xampp, then go to Xampp and then look for the folder
htdocs
This is the folder where you will be having all of your work
Creating a Folder:
Go to htdocs in Xampp
Create a new folder named “My Website”
All your work will be saved in this new folder
Objective No. 2:
To learn about the Software Architecture or Architecture of a Web Based Application.
What is Architecture?
Architecture can be defined as the designing of a model with all of its required components.
Architecture is the fundamental organization of a system embodied in its components, their
relationships to each other, and to the environment, and the principles guiding its design and
evolution. Every system has architecture, whether known or not. However, it may lack an
architectural description.
Software Architecture:
Software Architecture is the designing of a software model or a web based application using certain
notations and symbols.
Following are the general steps to follow for developing Architecture for Solution Domain:
Diagram below depicts the Web Application Architecture Data work flow
The picture below shows the server side scripting and user side scripting:
Step 1: The user enters a new Web page address or clicks a link that requires a new Web page from
the Web server.
Step 2: The Web browser connects the Web server and sends a HTTP GET command with the path
name of the requested Web page.
Step 3: The Web server fetches the HTML document of the requested page or asks an application
server to generate the HTML document.
Step 4: The Server-side scripting step: The Web server scans the HTML document for any server-
side script code embedded in the document. The Web server will remove the embedded script code
and execute it.
When the Web server executes the embedded script code, it will provide many host objects
representing the server host environment. Through those host objects, server-side script code can
easily access the carrying HTML document, the server file system, any databases, and networked
computers.
Usually, server-side script code will update the carrying HTML document with dynamic data
resulted from its computations.
At the end of the server-side script process step, the updated HTML document is ready to be sent
back the client - the Web browser.
Objective No. 3:
To learn Web Development by making a web page for User side Scripting using “HTML” for
Login purpose.
From the idea software architecture, we will now create a login form using “HTML Scripting.”
The steps for the creation of a “Login Web Page” are given below:
Steps:
Select PHP from Create New, which will open the following page
Click on split to have both views (i.e. the code view and the design view)
In HTML the code is written between the beginning and ending tags of body
</form>
Now insert a table for the login form from insert → table, Choose 4 rows and 3 columns
for the table
Now making text field for the user to type his username.
Insert→ Form→ Text Field
After merging
Now adding background, changing text color and thickening the borders of the form
using Page Properties from the properties pane. Also changing the font of the text.
Adding background picture and changing the font from the properties pane
Now save the two HTML documents by the names “index.php” and “submit.php” in
the folder MyWebsite in htdocs
To link the two documents, the action of the form will be given the destination of
submit.html
Browser Output:
Running it on the browser with the link
http://localhost/MyWebsite
Typing username and password and clicking the submit button will give
Now add some html tags for headings and paragraph writing:
Html Headings:
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading.
Html Paragraph
The HTML <p> element defines a paragraph.
Example:
Output:
Html Lists
HTML lists allow web developers to group a set of related items in lists.
Adding a list
Format list unordered list/ordered list
A list will appear like this
Exercise:
2) Explore and implement the other forms of lists (ordered list and definition list).
3) Explore and implement the Email link tag from the insert menu. Insert Emaillink.
Lab # 6
Theory:
This lab is mainly concerned with the learning about applying CSS rules to web pages in web
development. This lab also deals with Applying Validation to the login form with the help of Java
Scripting using Tag Inspector.
Objective No. 1:
To learn about CSS in Web Development and to get aware of Java Scripting.
CSS:
CSS stands for
C: Cascading
S: Style
S: Sheets
CSS (Cascading Style Sheets) is used to style HTML elements. Cascading Style Sheets (CSS) is a
simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents.
CSS was introduced together with HTML 4, to provide a better way to style HTML elements. CSS
can be added to HTML in the following ways:
Syntax:
CSS has a simple syntax and uses a number of English keywords to specify the names of various
style properties.
A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors, and
a declaration block.
Selectors:
In CSS, selectors are used to declare which part of the markup a style applies to, a kind of match
expression.
Declaration-Block:
A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a
property, a colon (:), and a value. If there are multiple declarations in a block, a semi-colon (;) must
be inserted to separate each declaration.
JavaScript, provides a way to validate form's data on the client's computer before sending it to the
web server. Form validation generally performs two functions.
Basic Validation - First of all, the form must be checked to make sure data was entered into
each form field that required it. This would need just loop through each field in the form
and check for data.
Data Format Validation - Secondly, the data that is entered must be checked for correct
form and value. This would need to put more logic to test correctness of data.
Required fields
Valid user name
Valid password
Valid e-mail address
Valid phone number
Forms validation on the client-side is essential it saves time and bandwidth, and gives more options
to point out to the user where they’ve gone wrong in filling out the form. It does not mean that
server-side validation is not needed. People who visit the site may use an old browser or have
JavaScript disabled, which will break client-only validation. Client and server-side validation
complement each other, and as such, they really shouldn’t be used independently.
Objective No. 2:
To Apply CSS in Web Development and to learn more about adding designs to web pages. From
previous lab, we have learnt to make a login form. Here are certain steps that are followed to
apply CSS
Steps:
Step 1. Create a LOGIN FORM using text fields and labels. Observe the effect of
placeholders on the browser.
Step 3. Then click on the option of New CSS Rule under the heading of Properties
Step 4. A new window will open - Enter the type and name of your selector. Also choose the
rule definition. Clicking on OK will open a new window which will save the new CSS file
Step 5. This Saves the style sheet and will attach on index page.
Step6. Now let’s explore some important attributes of CSS for alignment.
CSS Margins
The CSS margin properties are used to create space around elements,
outside of any defined borders.
CSS has properties for specifying the margin for each side of an element:
margin-top
margin-right
margin-bottom
margin-left
Example:
Output:
CSS PADDING
The CSS padding properties are used to generate space around an element's content, inside of
any defined borders.
CSS has properties for specifying the padding for each side of an element:
padding-top
padding-right
padding-bottom
padding-left
Step 8. After applying CSS, the form will look like this:
.CSS File:
This image show how the style.css file attach in index.php file
4.
This will open a new window; mark all the given fields to be required and the form will validated.
http://localhost//MyWebsite/index.php
Entering without the required fields filled
Exercise:
1. Use font properties like (font-size, font-family) and text properties like (color, text-
decoration).
2. Set the background image in the top right position as shown in the above web page
using the background properties (background-image, background-repeat, background-
position).
3. Create two hyperlinks in the above webpage.
4. Add a profile picture in your portfolio page and apply CSS rules on text and
backgrounds. Set the alignment of text and image accordingly.
Laboratory Exercise 07
Open-Ended Lab
Title:
1. Objective:
Select any project management topic like Hospital management
system, Library etc. and utilize Gantt Chart, Network Diagram, Use
Case Diagram. Create Login Form and design a webpage which
incorporates the pictures of above diagrams & apply proper CSS.
2. Hardware/Software Required
3. Diagram
4. Methodology
5. Observation Table
6. Results
____________________________________________________________________________
______
Department of Computer Engineering
Sir Syed University of Engineering & Technology, Karachi
CE-202: Software Engineering SSUET/QR/114
7. Conclusion
Laboratory Exercise 14
Open-Ended Lab
Title:
1. Objective:
2. Hardware/Software Required
3. Diagram
4. Methodology
5. Observation Table
____________________________________________________________________________
______
Department of Computer Engineering
Sir Syed University of Engineering & Technology, Karachi
CE-202: Software Engineering SSUET/QR/114
6. Results
7. Conclusion
____________________________________________________________________________
______
Department of Computer Engineering
Sir Syed University of Engineering & Technology, Karachi
Lab #8: Server Site Scripting on MY SQL SSUET/QR/114
Lab # 8
Objective: Implement Server Site Scripting On MY SQL and
Theory:
This lab is mainly concerned with the learning of the concept of Database and to get aware of the
Database of XAMPP i.e. MySQL. This lab also deals with the knowledge of relational logical structure
and different modes of backend database. In this lab we will also design a database using MySQL.
Objective #1:
To understand the concept of Database and to get to know about MySQL.
Database:
Database is regarded as software which is used to store certain kind of information. It follows a
Relational Structure for Data Information Storage. Often abbreviated as DB. Database can be defined
as a collection of information organized in such a way that a computer program can quickly select
desired pieces of data. For e.g. electronic billing system.
To access information from a database, you need a database management system (DBMS). This is a
collection of programs that enables you to enter, organize, and select data in a database.
Increasingly, the term database is used as shorthand for database management system.
CE-202L: Software Engineering Lab 64
Lab #8: Server Site Scripting on MY SQL SSUET/QR/114
MySQL:
MySQL is the database of XAMPP. Specialized database software, like MySQL, are just programs that
lets you store and retrieve the data as efficiently as possible. MySQL is the most popular database
system used with PHP. MySQL is a database system used on the web and it runs on a server as well.
It is ideal for both small and large applications as it is very fast, reliable, and easy to use. MySQL
supports standard SQL. MySQL compiles on a number of platforms and is free to download and use.
MySQL is developed, distributed, and supported by Oracle Corporation. The data in MySQL is stored
in tables. A table is a collection of related data, and it consists of columns and rows. Databases are
useful when storing information categorically.
Why MySQL:
One great thing about MySQL is that it can be scaled down to support embedded database applications.
Maybe it is because of this many people think that MySQL can only handle small and medium-sized
systems. The truth is that MySQL is the de-facto standard database system for web sites with HUGE
volumes of both data and end users (like Friendster, Yahoo, and Google). PHP combined with MySQL
are cross-platform (you can develop in Windows and serve on a Unix platform)
Objective #2:
To study the relational logical structure and to get an idea of Design and Data Entry Mode. Since
Databases follow relational structure. A relational structure can be represented by a cylinder:
LOGIN EXTRA
ACADEMIC CURRICUL
INFO S AR
ACTIVITIES
A user can create his database and can make amendments in it. After creating a database, the user can
insert tables for different types of data or information as shown in the above picture. The most
important point in making a database is to avoid redundancy i.e. to avoid multiple existence of same
information that can cause inconsistency. The databases nowadays have the facility to control
redundancy and the software that help in the creation of a database also facilitate the user by providing
direct control over redundancy.
Note: Primary Key is inherited with the properties of Not NULL and Unique.
In the table
Objective #3:
To design a Database in XAMPP (MySQL) and insert a table that holds fields and
records of Login information.
STEPS:
3. This will open a new window of php MyAdmin for creating a database
CE-202L: Software Engineering Lab 67
Lab #8: Server Site Scripting on MY SQL SSUET/QR/114
5. Create a database with name WEBAPP. Now click on webapp from the left of the page
6. This will take you to “Create table” asking for the name of your table a number of columns.
Write the name of table and the number of columns and click on Go.
1. Insert record in the table using the option of Insert from the top menu
2. This will open a new page for filling records in the specified fields. Fill up the fields and click
on Go.
Objective#4:
Introduction to GitHub
What is Github?
GitHub is a collaboration platform that uses Git for versioning. GitHub is a popular place to share
and contribute to open-source software.
What is a repository? A repository is a project containing files and folders. A repository tracks
versions of files and folders.
1) First, Create your account on github
https://gitforwindows.org/
4) Open your Git Bash
Git Bash can be downloaded in here ( https://git-scm.com/downloads), and it is a shell used to
interface with the operating system which follows the UNIX command.
5) Setting path
Go to the folder, right click and click git bash here
8) Commit the files staged in your local repository by writing a commit message
You can create a commit message by git commit -m 'your message', which adds the
change to the local repository.
git commit uses '-m' as a flag for a message to set the commits with the content where the
full description is included.
9) Copy your remote repository's URL from GitHubThe HTTPS or URL is copied from
the given GitHub account, which is the place of the remote repository.
10) Add the URL copied, which is your remote repository to where your local content
from your repository is pushed
git remote add origin 'your_url_name'
In the above code, The 'origin' is the remote name, and the remote URL is
Cloning a repository
When you create a repository on GitHub.com, it exists as a remote repository. You can clone
your repository to create a local copy on your computer and sync between the two locations.
1. On GitHub.com, navigate to the main page of the repository.
2. Above the list of files, click Code.
1. Create a new remote for the upstream repo with the command:
Now you can make changes to the code. The following code creates a new branch, makes an
arbitrary change, and pushes it to new_branch:
Once you push the changes to your repo, the Compare & pull request button will appear in
GitHub.
Open a pull request by clicking the Create pull request button. This allows the repo's
maintainers to review your contribution. From here, they can merge it if it is good, or they may
ask you to make some changes.
SUMMARY
In summary, if you want to contribute to a project, the simplest way is to:
Exercise:
The content for the given webpage was taken from
https://www.sqlservertutorial.net/sql-server-sample-database/
The BikeStores sample database has two schemas sales and production, and these schemas have
nine tables.
Create the given tables with the mentioned fields using XAMPP Server.
Create your github user account, fork and clone a repository of your group, edit the file,
push the code and pull the request in your remote repository.
Lab # 9
Theory:
This lab is mainly concerned with the learning of the concept of Server Side Scripting in PHP and
to get aware of the codes and syntax to link PHP with MySQL database. This lab also deals with
the practical implementation of the already discussed concepts. In this lab we will make a Login
form and design a database to store records and then link them to know if the data entered is
present in the database or not.
Objective #1:
To understand the concept of Server Side Scripting and PHP.
Server-Side Scripting:
Server-side scripting is a web server technology in which a user's request is fulfilled by running
a script directly on the web server to generate dynamic web pages. It is usually used to provide
interactive web sites that interface to databases or other data stores. The primary advantage to
server-side scripting is the ability to highly customize the response based on the user's
requirements, access rights, or queries into data stores.
From security point of view, server-side scripts are never visible to the browser as these scripts
are executes on the server and emit HTML corresponding to user's input to the page.
When the server serves data in a commonly used manner, for example according to the HTTP or
FTPprotocols, users may have their choice of a number of client programs (most modern web
browsers can request and receive data using both of those protocols). In the case of more
specialized applications, programmers may write their own server, client, and communications
protocol that can only be used with one another.
Programs that run on a user's local computer without ever sending or receiving data over a
network are not considered clients, and so the operations of such programs would not be
considered client-side operations but will be called server-side scripts
PHP:
PHP is a widely-used general-purpose scripting language that is especially suited for Web
development and can be embedded into HTML. PHP is an acronym for Hypertext Preprocessor.
It’s a widely-used, open source scripting language. PHP scripts are executed on the server and
PHP can create, open, read, write, and close files on the server.
PHP can generate dynamic page content and can collect form data. It can add, delete, and modify
data in your database. It has the ability to restrict users to access some pages on your website. One
of the important features is that PHP can send and receive cookies and can encrypt data.
PHP File:
PHP files can contain text, HTML, CSS, JavaScript, and PHP code. PHP codes are executed on
the server, and the result is returned to the browser as plain HTML. PHP files have extension
".php"
Why PHP:
PHP is easy to learn and runs efficiently on the server side and supports a wide range of
databases. PHP runs on various platforms (Windows, Linux, UNIX, Mac OS X, etc.). PHP is
compatible with almost all servers used today (Apache, IIS, etc.).
Objective #2:
To learn to link PHP with MySQL Database. Before you can get content out of your MySQL
database, you must know how to establish a connection to MySQL from inside a PHP script. To
perform basic queries from within MySQL is very easy.
Let's get started. The first thing to do is connect to the database. The function to connect to
MySQL is called mysql_connect. This function returns a resource which is a pointer to the
database connection. It's also called a database handle, and we'll use it in later functions. Don't
forget to replace your connection details.
Before linking PHP with MySQL Database Adobe Dreamweaver CS6 is configured with
LocalHost
Setting up Dreamweaver
The main section we will be working with is the “Servers” window. Click “Servers”. If you
have not configured a server before, this window should be empty. In order to add a server
we need to click on the “plus sign”.
This should bring up a window with “Basic” and “Advanced” options. You don’t have to
change anything on the “Basic” window.
When you click on the “Advanced” options, the important setting is the one listed in the
“Test Server” section at the bottom. Make sure that the drop-down menu has “PHP MySQL”
selected and click the “Save” button.
Finally, user will see the newly created server in the “Servers” window. Make sure to
uncheck the box labeled “Remote” and change it to “Testing”. Click “Save” and you have
finished your Dreamweaver and localhost configuration.
Submit.php
<?php
session_start();
$uname = $_POST['uname'];
$pwd = $_POST['pswd'];
$_SESSION['usern'] = $uname;
$db_user = 'root';
$db_pass = "";
$db = 'test';//test
$result = mysqli_query($con,$sql);
$hashed_password =
'$2y$10$MQU3vDgoN10.JxyJ1m9UQOEqFy.Jg3D8tmHdZUAAkcpGFRwkbbLfi';
if (password_verify($password, $hashed_password)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
}
$sql= "SELECT * from login where uname = '$uname' AND pwd = '$pwd'";
$result = mysqli_query($con,$sql);
if(mysqli_num_rows($result) > 0 )
{
//$result = mysqli_query($con,$sql);
$row=mysqli_fetch_array($result);
{
header('location: menu.php');
}
}
else {
header ('location: exit.php');
}
mysqli_close();
?>
Now the code for menu.php. This will take you to the next page in case of success:
Menu.php:
<?php
session_start();
// FILE CALLED FROM Submit.php IN CASE OF SUCCESS
echo "Welcome User : ";
echo $_SESSION['usern'];
echo "<br>";
echo "Manage User Menu";
echo "<br>";
echo "================";
echo "<br>";
echo "<br>";
?>
<a href="view.php">1. View reports</a>
<br>
<b><a href="updateform.php">2. Update your Password</a><b>
<br>
<a href="insertform.php">3. Create New account</a>
<br>
<a href="delete.php">4. Delete your Account</a>
<br>
<a href="index.php">5. Login</a>
<br>
<a href="exit.php">6. Logout</a>
Exit.php
<?php
session_start();
// FILE CALLED FROM Submit.php IN CASE OF FAILURE
echo "Login Failure for user: ";
echo $_SESSION['usern'];
echo "<br>";
echo "Click here to Re attemp Login: ";
//session_destroy();
?>
BROWSER OUTPUT:
Running it on the browser with the link
http://localhost/test/index.php
Exercise:
The flowchart given below is from online-example - Login Process (genmymodel.com)
Lab # 10
Theory:
This lab is mainly concerned with the learning of the concept of Server Side Scripting in PHP and to
get aware of the concept of VIEW ALL RECORDS in PHP. In this lab we are actually implementing
the functionality of VIEW ALL RECORDS in PHP.
Objective #1:
To understand the concept of viewing records from database.
The term “view all records” is used for displaying the records of the users stored in the database which
are being fetched by PHP.To get PHP to execute the viewing functionality we must use the
mysqli_query() function. This function is used to send a query or command to a MySQL
connection.Next, we use the mysqli_fetch_array() function to return the first row from the record set
as an array. Each call to mysqli_fetch_array() returns the next row in the record set. The while loop
loops fetch through all the records in the record set. To print the value of each row, we use the PHP
$row variable ($row ['Username'] and $row ['Password']).
Objective #2:
To view reports or multiple records from database.
View.php
<?php
$db_user = 'root';
$db_pass = "";
$db = 'test';//test
if(! $conn ) {
die('Could not connect: ' . mysql_error());
}
$sql = 'SELECT uname, pwd FROM login';
if(! $retval )
die('Could not get data: ' . mysql_error());{
echo "<table>";
echo "<tr>";
echo "<th>Username</th>";
echo "<th>Password</th>";
echo "</tr>";
while($row = mysqli_fetch_array($retval, MYSQL_NUM)) {
echo "<tr>";
echo "<td>" . $row[0] . "</td>";
echo "<td>" . $row[1] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
BROWSER OUTPUT:
Exercise:
Design a login form using Dreamweaver, database using phpMyAdmin and create view report.
The table is from: https://www.allphptricks.com/insert-view-edit-and-delete-record-from-
database-using-php-and-mysqli/
Lab # 11
Theory:
This lab is mainly concerned with the learning of the concept of Server Side Scripting in PHP and
to get aware of the concept of UPDATE RECORDS in PHP. In this lab we are actually
implementing the functionality of updating records of the previously stored data using PHP.
Objective #1:
To understand the concept of updating records, present in database.
UPDATE RECORD:
The UPDATE statement is used to update existing records in a table.Data can be updated into
MySQL tables by executing SQL UPDATE statement through PHP function mysql_query. The
SQL UPDATE statement allows you to update a single record or multiple records in a table.
Objective #2:
To update record present in MySQL database using PHP.PHP code for updating record is as
follows:
Update.php
<?php
$db_user = 'root';
$db_pass = "";
$db = 'test';//test
if(! $conn ) {
if(! $retval )
echo "<table>";
echo "<tr>";
echo "<th>Username</th>";
echo "<th>Password</th>";
echo "<th>Action</th>";
echo "</tr>";
echo "<tr>";
echo "</tr>";
echo "</table>";
if(!empty($_POST))
$newpwd1 = $_POST['pswd'];
$id = $_POST['id'];
$result=mysqli_query($conn, $sql);
if($result)
}else{
$id = $_GET['id'];
//$newpwd1
$result=mysqli_query($conn, $sql);
CE-202L: Software Engineering Lab 97
Lab#11:Web Development – Edit Record SSUET/QR/114
if($result)
?>
<tr>
</tr>
<tr>
<td width="78"><em><strong>Username</strong></em></td>
<td width="144"><em><strong>
</strong></em></td>
<td width="22"> </td>
</tr>
<tr>
<td><em><strong>Password</strong></em></td>
<td><em><strong>
</strong></em></td>
CE-202L: Software Engineering Lab 98
Lab#11:Web Development – Edit Record SSUET/QR/114
<td> </td>
</tr>
<tr>
<td> </td>
<td><em><strong></strong></em></td>
</tr>
</table>
</form>
BROWSER OUTPUT:
Running it on the browser with the link
http://localhost/test/
Exercise:
Design a login form using Dreamweaver, database using phpMyAdmin and create update
record.
The table is from: https://www.allphptricks.com/insert-view-edit-and-delete-record-from-
database-using-php-and-mysqli/
Lab # 12
Theory:
This lab is mainly concerned with the learning of the concept of Server Side Scripting in PHP and
to get aware of the concept of INSERTING & DELETING RECORDS in PHP. In this lab we are
actually implementing the functionality of insertion and deletion of records using PHP.
Objective #1:
To understand the concept of inserting in and deleting records from database.
The INSERT INTO statement is used to insert new records in a table. It is possible to write the
INSERT INTO statement in two forms. The first form does not specify the column names where
the data will be inserted, only their values. The second form specifies both the column names and
the values to be inserted.
The DELETE statement is used to delete rows in a table. It is possible to delete all rows in a table
without deleting the table. This means that the table structure, attributes, and indexes will be
intact.
Objective #2:
Insert.php
<?php
if(!empty($_POST))
{
$uname = $_POST['uname'];
$pwd = $_POST['pswd'];
$db_user = 'root';
$db_pass = "";
$db = 'test';//test
$result=mysqli_query($con, $sql);
if($result)
{
echo "You have successfully created new account";
}
else{
echo "Operation Failure please re-attempt";
}
}
?>
<form id="insert_form" name="insert_form" method="post" action="">
<table width="285" border="1">
<tr>
<th colspan="3" scope="col"><em><strong>Insert User Record</strong></em></th>
</tr>
<tr>
<td width="78"><em><strong>Username</strong></em></td>
<td width="144"><em><strong>
<input type="text" name="uname" id="uname" />
</strong></em></td>
<td width="22"> </td>
</tr>
<tr>
<td><em><strong>Password</strong></em></td>
<td><em><strong>
<input type="password" name="pswd" id="pswd" />
</strong></em></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><em><strong></strong></em></td>
<td><input type="submit" name="submit" id="submit" value="Submit" /></td>
</tr>
</table>
</form>
BROWSER OUTPUT:
Objective # 3:
Delete.php
<?php
session_start();
$uname = $_SESSION['usern'] ;
$db_user = 'root';
$db_pass = "";
$db = 'test';//test
if(! $conn ) {
die('Could not connect: ' . mysql_error());
}
if($result)
else
?>
BROWSER OUTPUT:
Exercise:
Design a login form using Dreamweaver, database using phpMyAdmin and add 2 more
records and delete first 3 records and show the resultant table.
The table is from: Add, Edit and Delete Record using PHP/MySQL | Free Source Code,
Projects & Tutorials (sourcecodester.com)
Lab # 13
Theory:
A SRS is a document which contains the complete description of software without
talking much about implementation details.
It is a set of precisely stated properties and constraints which final product must
satisfy.
Clearly and accurately describes each of the essential requirements (functions,
performance, design constraints, and quality attributes) of the system / software and
its external interfaces .
Defines the scope and boundaries of the system / software.
Each requirement must be described in such a way that it is feasible and objectively
verifiable by a prescribed method (e.g., by inspection, demonstration, analysis, or test)
Basis for contractual agreements between contractors or suppliers and customers
Specifications are intended to a diverse audience.
o Customers and users for validation, contract, ... Systems (requirements)
analysts
o Developers, programmers to implement the system
o Testers to check that the requirements have been met
o Project Managers to measure and control the project
1. Functional Requirements
2. Non - Functional Requirements
3. Static Requirements
4. Execution Constraints eg. Response time, throughput time
5. Standards to be followed
6. Security requirements
7. Company Policies
8. Interface with other external agents ie. persons, software or hardware
Problem Decomposition: SRS helps to break down the problem into its component parts in
an orderly fashion.
Input to Design Specification: SRS contains sufficient detail in the functional system
requirements so that a design solution can be devised.
Product Validation Check: SRS serves as the parent document for testing and validation
strategies that will be applied to the requirements for verification.
Characteristics of an SRS
1. Correctness:
User review is used to ensure the correctness of requirements stated in the SRS. SRS
is correct if it covers all the requirements that are actually expected from the system.
2. Completeness:
Completeness of SRS indicates every sense of completion including the numbering of
all the pages, resolving the to be determined parts to as much extent as possible as
well as covering all the functional and non-functional requirements properly.
3. Consistency:
Requirements in SRS are said to be consistent if there are no conflicts between any set
of requirements. Examples of conflict include differences in terminologies used at
separate places, logical conflicts like time period of report generation, etc.
4. Unambiguous:
An SRS is said to be unambiguous if all the requirements stated have only 1
interpretation. Some of the ways to prevent unambiguousness include the use of
modelling techniques like ER diagrams, proper reviews etc.
5. Ranking for importance and stability:
There should a criterion to classify the requirements as less or more important or more
specifically as desirable or essential. An identifier mark can be used with every
requirement to indicate its rank or stability.
6. Modifiability:
SRS should be made as modifiable as possible and should be capable of easily
accepting changes to the system to some extent. Modifications should be properly
indexed and cross-referenced.
7. Verifiabile:
There must exist a cost effective way of checking if software satisfies requirements
8. Traceability:
One should be able to trace a requirement to a design component and then to a code
segment in the program. Similarly, one should be able to trace a requirement to the
corresponding test cases.
9. Design Independence:
There should be an option to choose from multiple design alternatives for the final
system. More specifically, the SRS should not include any implementation details.
10. Testability:
An SRS should be written in such a way that it is easy to generate test cases and test
plans from the document.
11. Understandable by the customer:
An end user maybe an expert in his/her specific domain but might not be an expert in
computer science. Hence, the use of formal notations and symbols should be avoided
The language should be kept easy and clear.
12. Right level of abstraction:
If the SRS is written for the requirements phase, the details should be explained
explicitly.
Exercise:
Laboratory Exercise 14
Open-Ended Lab
2. Hardware/Software Required
3. Diagram
4. Methodology
5. Observation Table
6. Results
____________________________________________________________________________
______
Department of Computer Engineering
Sir Syed University of Engineering & Technology, Karachi
CE-202L: Software Engineering Lab SSUET/QR/114
7. Conclusion
____________________________________________________________________________
______
Department of Computer Engineering
Sir Syed University of Engineering & Technology, Karachi