Tuesday 27 February 2018

Software Engineering | SE Lecture 2

>>>>> Download Link here <<<<<

You can download the slides from the link given above.
In this lecture, we will focus on following points:

  1. Software Process Models
  2. Linear Sequential Model
  3. Prototyping Model

--------------------------------------------------------------------------
In slide:

Software Process Models – 1
By Abdul Razaq Ali
Lecturer, PUCIT
In Today’s Lecture
Introduction
Linear Sequential Model
Prototyping Model
Quick Look
What is it?
Prescriptive process models define a distinct set of activities, actions, tasks, milestones, and work products that are required to engineer high quality software
These Process models are not perfect, but they do provide a useful roadmap
Who does it?
Software engineers adapt them to their needs and then follow it
Why is it important?
It provides stability, control and organization to an activity
What are the steps?
The process guides a software team through a set of framework activities that are organized into a process flow that may be linear, incremental, or evolutionary.
Software Process Models
A model
 is a structured collection of elements that describe characteristics of effective processes. 
Software Process Model
Is the strategy to adopt software engineering as a layered technology
A simplified representation of a set of activities whose goal is the development or evolution of software, presented from specific perspective
Prescriptive Models
Prescriptive software process models called “prescriptive” because
Prescribe a set of process elements- framework activities, software engineering actions, tasks, work products, quality assurance and change control mechanisms for each project.
Prescribes a workflow - The manner in which the process elements are interrelated to each other (linear, incremental or evolutionary)


Software engineers have traditionally chosen a generic process framework consisting of the following framework activities which can be applied on any process model
Communication
Planning
Modeling
Construction
Deployment

The Process Model: Adaptability
The framework activities will always be applied on every project ... BUT

The tasks (and degree of rigor) for each activity will vary based on:
the type of project (an “entry point” to the model)
characteristics of the project
common sense judgment; concurrence of the project team
The environment in which the work will be conducted
Process Flow
Iterative
Evolutionary
Parallel
The Waterfall Model
Alternate names
Linear Sequential Model
Classic Life cycle

Introduction
A systematic, sequential approach to software development that begins at the system level and progresses through analysis, design, coding, testing, and support.
                         OR
A systematic, sequential approach to software development that begins with customer specification of requirements and progresses through planning, modeling, construction, and deployment, culminating in on-going support of the completed software.



Linear Sequential Model

Used when
The requirements of a problem are reasonably well understood 
When work flows from communication through deployment in a reasonably linear fashion.
Disadvantages
Real projects rarely follow the sequential flow that the model proposes.
It is often difficult for the customer to state all requirements explicitly.
A working version of the program will not be available until late in the project time span.
Linear nature leads to “blocking states”.
The Prototyping Model
The developer and customer define the overall (general) objectives for the software. 
In other cases, developer may be unsure of the efficiency of an algorithm, the adaptability of an operating system, or the form that human-machine interaction should take
A quick design focuses on what the customer will see.  From this, a prototype is constructed.

Prototyping can be treated as a standalone process model
More commonly treated as a TECHNIQUE that can be implemented within the context of any one of the process models

A prototype is a smaller-scale, representative or working model of the user requirements or a proposed design for an information system. 
 The user evaluates it and improvements are made.  This continues in an iterative fashion until a satisfactory product is achieved
The Prototyping Model
Advantages & Disadvantages
?
(Homework)
Highlights of today’s lecture
Software Process Models
Linear Sequential Model
Prototyping Model
Book Reading
Roger S. Pressman  “Software Engineering- A practitioner’s approach”, 7th Ed. 
2.3 

Questions?

Software Engineering | SE Lecture 1

>>>>> Download Link here <<<<<

You can download the slides from the link given above.
In this lecture, we will focus on following points:

  1. The Scope of Software Engineering
  2. Motivation and need for software engineering
  3. Definition of Software Engineering
  4. Introduction to software engineering vocabulary

--------------------------------------------------------------------------
In slide:

Introduction to Software Engineering

By Abdul Razaq Ali

Lecturer, PUCIT

Why this subject?

We know how to code!

But can we build Facebook alone??

So why this course?

To learn how to develop different software by using different methods (process models).


Importance

The core subject like PF, OOP, DSA and Data bases

Ensure your survival in industry

Increase your chances to become a team lead or project manager in shortest time possible.

Mark Division

Mid 35%

Final 40%

Classroom assessment 25%

Quizzes & Tests 10 marks

Assignment and Presentations 5 marks

Project 10 marks

Books and Reading Materials

Data will be posted on “pucitbookstore”

What’s PUCITBookStore?

Google it (Homework)

2  main Books:

Roger S. Pressman  “Software Engineering- A practitioner’s approach”, 7th Ed.

Craig Larman  “Applying UML and design Patterns”, 2nd Ed.

Some Ground Rules

Don’t beg for marks at the end of semester. You look really pathetic when you beg

Do work on daily basis

Check your CMS on regular basis and ensure your marks are correct.

Visit “PUCITBookStore.blogger.com” on daily basis to download curse content and see announcements.


(Cont.)

Keep you mobile phones on silent.

You are allowed to take calls outside the class

Any type of misbehavior will not be tolerated.

Any type of cheating will result direct F in your course and a report will be filed to your degree coordinator and higher authorities.

So, don’t cheat.

You will eventually get good marks if you do your work on daily basis

(Cont.)

Don’t beg for attendance.

Questions are appreciated

But avoid off topic questions.


And last…

Good students get Good teachers

Bad students get Bad teachers

Software

Definition

Computer software is the product that software engineers design and build

Components of Software

Types of software

Generic software

Stand-alone systems produced by a development organization and sold on the open market to any customer

for example word processors, spreadsheets and games

Customized software

Systems commissioned by a particular customer.

for example web sites, air-traffic control systems and software for managing the finances of large organizations

Engineering

Definition

Implementation of a solution to a practical problem

Comprises any kind of activity which aims at either solving a problem or completing a task related to the definition, design, and specification of a product.

Analysis, design, construction, verification, and management of technical (or social) entities.

Software Engineering

Definition

Establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines.

The application and study of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software; that is the application of engineering to software

Importance of Software Engineering

Software crisis

Software quality

Over budget

Out of schedule-OS360

Property damage-explosion of European Ariane rocket

Life and death-radiotherapy


Difference

Software Engineering

Concerned with the practicalities of developing and delivering useful software

A field of study deals with practicalities of software development

Computer science

Concerned with theory and fundamentals

A field of study deals with theories and practices of computation, communication, automation, coordination and data manipulation.

Difference

System engineering

Concerned with all aspects of computer-based systems development, including hardware, software, and process engineering

Software engineering

Part of system engineering

Deals with software only

Highlights of today’s lecture

The Scope of Software Engineering

Motivation and need for software engineering

Definition of Software Engineering

Introduction to software engineering vocabulary

Book Reading

Roger S. Pressman  “Software Engineering- A practitioner’s approach”, 7th Ed.

1.1


Questions?

Software Engineering | SE BOOKS

You can download the following books from here

A.       Roger S. Pressman  “Software Engineering- A practitioner’s approach”, 7th Ed.
       B.      Craig Larman  “Applying UML and design Patterns”, 2nd Ed.

>>>>> Download Link Here <<<<<



Monday 12 February 2018

Calculator in Java / Android

You are allowed to change this code and play with it. Have fun!

package com.zaigham.calculator;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import java.util.regex.Pattern;

public class MainActivity extends AppCompatActivity {

    private TextView txt1;
    private String display= "";
    private String currentOperator="";
    private String result ="";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        txt1 = (TextView)findViewById(R.id.textview);
        txt1.setText(display) ;
    }

    private void updateScreen()
    {
        txt1.setText(display);
    }

    public void onClickNumber (View v)
    {
        if (result!=""){
            clear();
            updateScreen();
        }
        Button b =(Button) v;
        display += b.getText();
        updateScreen();
    }

    public boolean isOperator(char op)
    {
        switch (op)
        {
            case'+':
            case'-':
            case'*':
            case'/': return true;
            default: return false;
        }
    }

    public void onClickOperator (View v)
    {
        if (display=="") return;
        Button b =(Button) v;
        if (result!="")
        {
            String _display=result;
            clear();
            display = _display;
        }
        if (currentOperator!="")
        {
            Log.d("Calc",""+display.charAt(display.length()-1));
           if(isOperator(display.charAt(display.length()-1)))
           {
               display = display.replace
                       (display.charAt(display.length()-1),b.getText().charAt(0));
               updateScreen();
               return;
           }
           else{
               getResult();
               display=result;
               result="";
           }
            currentOperator = b.getText().toString();
        }
        display += b.getText();
        currentOperator = b.getText().toString();
        updateScreen();
    }

    private void clear()
    {
        display="";
        currentOperator="";
        result="";
    }

    public void onClickClear(View v)
    {
        clear();
        updateScreen();
        result="";
    }

    public double operate(String a,String b, String op)
    {
        switch(op)
        {
            case"+": return Double.valueOf(a) + Double.valueOf(b);
            case"-": return Double.valueOf(a) - Double.valueOf(b);
            case"*": return Double.valueOf(a) * Double.valueOf(b);
            case"/":try {
                return Double.valueOf(a) / Double.valueOf(b);
            }catch(Exception e) {
                Log.d("Calc", e.getMessage());
            }
                default:return-1;
        }
    }

    private boolean getResult()
    {
        if(currentOperator=="") return false;
        String[] operation = display.split(Pattern.quote(currentOperator));
        if (operation.length<2) return false;
        result= String.valueOf(operate(operation[0],operation[1],currentOperator)) ;
        return true;
    }

    public void onClickEqual(View v)
    {
        if (display=="") return;
        if (!getResult())return;
        txt1.setText(display+"\n"+String.valueOf(result));
    }
}

Tuesday 6 February 2018

SRE - Final Marks (afternoon)

Roll No.                                 Mids                            Finals                         Sessionals                    Total
_________________________________________________________________________________

bsef15a005@pucit.edu.pk, 17.23077 28 10 55.23076923
bsef15a006@pucit.edu.pk, 20.19231 23 19 62.19230769
bsef15a008@pucit.edu.pk, 25.03846 27.5 19.5 72.03846154
bsef15a009@pucit.edu.pk, 24.5 27.5 19.5 71.5
bsef15a011@pucit.edu.pk, 27.73077 29.5 14 71.23076923
bsef15a015@pucit.edu.pk, 28.80769 34 20.75 83.55769231
bsef15a017@pucit.edu.pk, 28.53846 32.25 19.25 80.03846154
bsef15a018@pucit.edu.pk, 29.07692 32 16 77.07692308
bsef15a019@pucit.edu.pk, 29.34615 30.5 19.5 79.34615385
bsef15a020@pucit.edu.pk, 25.57692 28 19.75 73.32692308
bsef15a022@pucit.edu.pk, 26.11538 26.75 17 69.86538462
bsef15a024@pucit.edu.pk, 26.38462 28 19.5 73.88461538
bsef15a025@pucit.edu.pk, 31.23077 34 17.75 82.98076923
bsef15a026@pucit.edu.pk, 28.53846 26.25 16 70.78846154
bsef15a029@pucit.edu.pk, 28.53846 28.75 19.75 77.03846154
bsef15a030@pucit.edu.pk, 24.76923 27.25 16 68.01923077
bsef15a031@pucit.edu.pk, 21.80769 26.25 19 67.05769231
bsef15a032@pucit.edu.pk, 28.53846 28.25 17.75 74.53846154
bsef15a034@pucit.edu.pk, 20.73077 30.5 10.5 61.73076923
bsef15a035@pucit.edu.pk, 28.80769 32.25 14.75 75.80769231
bsef15a036@pucit.edu.pk, 29.07692 33.5 18.5 81.07692308
bsef15a039@pucit.edu.pk, 26.38462 25.25 21.25 72.88461538
bsef15a041@pucit.edu.pk, 21.26923 32 13.25 66.51923077
bsef15a043@pucit.edu.pk, 23.69231 27 16.5 67.19230769
bsef15a044@pucit.edu.pk, 26.38462 29.25 19.5 75.13461538
bsef15a045@pucit.edu.pk, 25.57692 29.25 19 73.82692308
bsef15a050@pucit.edu.pk, 27.46154 33 19.25 79.71153846
bsef15a051@pucit.edu.pk, 27.73077 26.25 18.5 72.48076923
bsef15m060@pucit.edu.pk, 12.11538 16.5 6.75 35.36538462
bsef12m059@pucit.edu.pk, 12.65385 16.75 0 29.40384615
bcsf12a006@pucit.edu.pk, 12.11538 11.5 0 23.61538462
bsef14a048@pucit.edu.pk, 27.73077 26.25 0 53.98076923

SRE - Final Marks (morning)



Roll No.                                 Mids                            Finals                         Sessionals                    Total
_________________________________________________________________________________

bsef15m001@pucit.edu.pk, 33.11538462 37.25 20.75 91.11538462
bsef15m002@pucit.edu.pk, 28.80769231 32.25 18.75 79.80769231
bsef15m004@pucit.edu.pk, 29.61538462 33.25 22 84.86538462
bsef15m005@pucit.edu.pk, 30.69230769 30.75 20.75 82.19230769
bsef15m006@pucit.edu.pk, 25.30769231 27.75 16 69.05769231
bsef15m007@pucit.edu.pk, 23.69230769 25.75 16.5 65.94230769
bsef15m008@pucit.edu.pk, 28.80769231 31.75 21 81.55769231
bsef15m009@pucit.edu.pk, 23.96153846 29.25 13 66.21153846
bsef15m011@pucit.edu.pk, 30.42307692 33.5 19.25 83.17307692
bsef15m012@pucit.edu.pk, 25.57692308 30.5 18 74.07692308
bsef15m013@pucit.edu.pk, 31.5 34 15 80.5
bsef15m014@pucit.edu.pk, 30.69230769 32.5 19 82.19230769
bsef15m015@pucit.edu.pk, 30.42307692 32.75 18.75 81.92307692
bsef15m016@pucit.edu.pk, 27.19230769 27.75 16.75 71.69230769
bsef15m017@pucit.edu.pk, 29.88461538 29.5 16.5 75.88461538
bsef15m018@pucit.edu.pk, 20.73076923 27.25 15.5 63.48076923
bsef15m019@pucit.edu.pk, 26.38461538 30.5 16.5 73.38461538
bsef15m020@pucit.edu.pk, 29.61538462 32 18.5 80.11538462
bsef15m022@pucit.edu.pk, 27.73076923 30.25 21.5 79.48076923
bsef15m023@pucit.edu.pk, 26.11538462 25.75 16.25 68.11538462
bsef15m024@pucit.edu.pk, 26.38461538 33 19.75 79.13461538
bsef15m025@pucit.edu.pk, 30.15384615 29.5 20.5 80.15384615
bsef15m026@pucit.edu.pk, 22.07692308 27.25 13.5 62.82692308
bsef15m027@pucit.edu.pk, 29.07692308 30.25 4 63.32692308
bsef15m029@pucit.edu.pk, 19.65384615 0 6 25.65384615
bsef15m032@pucit.edu.pk, 31.76923077 32.5 19.5 83.76923077
bsef15m033@pucit.edu.pk, 18.57692308 31.25 14.75 64.57692308
bsef15m034@pucit.edu.pk, 29.07692308 30.75 20.25 80.07692308
bsef15m035@pucit.edu.pk, 19.11538462 35 20.5 74.61538462
bsef15m037@pucit.edu.pk, 25.30769231 30.5 17.25 73.05769231
bsef15m038@pucit.edu.pk, 23.15384615 21.5 13.5 58.15384615
bsef15m039@pucit.edu.pk, 29.61538462 31 19.25 79.86538462
bsef15m041@pucit.edu.pk, 27.73076923 25 13 65.73076923
bsef15m042@pucit.edu.pk, 25.03846154 23.75 13.5 62.28846154
bsef15m044@pucit.edu.pk, 25.03846154 28 15 68.03846154
bsef15m045@pucit.edu.pk, 17.23076923 31.75 20.5 69.48076923
bsef15m046@pucit.edu.pk, 18.30769231 25.5 15 58.80769231
bsef15m047@pucit.edu.pk, 21 31 13.75 65.75
bsef15m049@pucit.edu.pk, 18.30769231 24.5 15.5 58.30769231
bsef15m051@pucit.edu.pk, 22.07692308 22.5 15.75 60.32692308
bsef15m052@pucit.edu.pk, 28 31.75 19 78.75
bsef15m053@pucit.edu.pk, 27.19230769 33 19.25 79.44230769
bsef15m055@pucit.edu.pk, 29.34615385 28.5 19.5 77.34615385
bsef15m057@pucit.edu.pk, 26.65384615 28.75 18.75 74.15384615
bsef15m058@pucit.edu.pk, 24.23076923 25.25 17 66.48076923
bsef15m059@pucit.edu.pk, 19.92307692 25.25 12.5 57.67307692
bsef15m062@pucit.edu.pk, 25.84615385 23.5 19 68.34615385
bsef15m064@pucit.edu.pk, 27.73076923 34 18.25 79.98076923
bsef15m065@pucit.edu.pk, 29.61538462 34 18.5 82.11538462
bsef15m066@pucit.edu.pk, 22.34615385 21 14.5 57.84615385
bsef12m044@pucit.edu.pk, 19.11538462 16 2.5 37.61538462
bsef13m039@pucit.edu.pk, 21.53846154 22 0 43.53846154
bsef14m002@pucit.edu.pk, 23.69230769 23.75 0 47.44230769
bsef14m046@pucit.edu.pk, 17.5 0 0 17.5
bsef14m058@pucit.edu.pk, 16.69230769 23.25 12.25 52.19230769
bsef14a005@pucit.edu.pk, 23.42307692 24.25 11.5 59.17307692
bsef14a012@pucit.edu.pk, 24.76923077 23.75 15.5 64.01923077
bsef14a025@pucit.edu.pk, 28 26.5 3 57.5
bsef14a027@pucit.edu.pk, 26.38461538 29.25 15.5 71.13461538
bsef14a035@pucit.edu.pk, 15.34615385 26 3 44.34615385
bsef14a030@pucit.edu.pk, 24.23076923 26.5 14.75 65.48076923
bsef14a041@pucit.edu.pk, 33.38461538 34.75 5.5 73.63461538