problem oriented software engineering01

25
Project Review Project Review P.Siva krishna 091fb08023. Under The guidence of P SUBBARAO Assi Prof.

Upload: sivacse09

Post on 28-Jan-2015

104 views

Category:

Education


0 download

DESCRIPTION

router control problem

TRANSCRIPT

Page 1: Problem oriented software engineering01

Project ReviewProject Review

P.Siva krishna091fb08023.

Under The guidence of P SUBBARAO Assi Prof.

Page 2: Problem oriented software engineering01

Problem Oriented Software Problem Oriented Software Engineering:Engineering:

Solving The Package Solving The Package Router Control ProblemRouter Control Problem

Page 3: Problem oriented software engineering01

AgendaAgenda

We present the basic elements of Problem Oriented Software Engineering (POSE), which aims at bringing both non formal and formal aspects of software development together in a single framework.

We provide an example of a detailed and systematic POSE development of a software problem: that of designing the controller for a package router.

Page 4: Problem oriented software engineering01

MotivationMotivation The properties are not necessarily expressible in The properties are not necessarily expressible in

any single linguistic system.any single linguistic system. The notion of mathematical (logical) proof does not The notion of mathematical (logical) proof does not

apply to them.apply to them. Some approaches address only the formal Some approaches address only the formal

concerns, usually in a single formal language.concerns, usually in a single formal language. others address only the non-formal concerns by others address only the non-formal concerns by

using several languages, which often cannot be using several languages, which often cannot be reconciled.reconciled.

Page 5: Problem oriented software engineering01

JustificationJustification

A detailed and systematic POSE development of a A detailed and systematic POSE development of a software problem that of designing the controller for software problem that of designing the controller for a package router.a package router.

POSE which aims at bringing both non-formal and POSE which aims at bringing both non-formal and formal aspects of software development together in formal aspects of software development together in a single framework.a single framework.

POSE is intended to provide a structure within which POSE is intended to provide a structure within which the results of different development activities can be the results of different development activities can be combined and reconciled.combined and reconciled.

Page 6: Problem oriented software engineering01
Page 7: Problem oriented software engineering01

SYSTEM REQUIREMENTSSYSTEM REQUIREMENTS

HARDWARE REQUIREMENTS HARDWARE REQUIREMENTS

Hard disk : 40GBHard disk : 40GB

Monitor : 15’ inchesMonitor : 15’ inches

RAM : 256 MB RAMRAM : 256 MB RAM

Processor : Pentium 4/2.4 GHZProcessor : Pentium 4/2.4 GHZ

Page 8: Problem oriented software engineering01

SOFTWARE REQUIREMENTSSOFTWARE REQUIREMENTS

Front end : java SwingFront end : java Swing

Tool : JFrameBuilderTool : JFrameBuilder

Os : windows xpOs : windows xp

Page 9: Problem oriented software engineering01

DESIGNDESIGN

Data Flow DiagramData Flow Diagram

On/off Conveyor Belt

Reading Station

SwitchMisrouted

Display

Destination

Yes

No

Page 10: Problem oriented software engineering01

ModulesModules

ControllerController Conveyor BeltConveyor Belt Reading Reading

StationStation SwitchSwitch

Page 11: Problem oriented software engineering01

Module Description 1Module Description 1

ControllerController

It controls the on/off switch, based on the controller It controls the on/off switch, based on the controller

the control goes to other modules. Controller the control goes to other modules. Controller

controls all the process involved in Package router controls all the process involved in Package router

problem.problem.

Page 12: Problem oriented software engineering01

Controller Controller Given Input Switch on the controller.Given Input Switch on the controller. Given OutputGiven Output The control will pass to the other modules The control will pass to the other modules

and the packets will sent to the and the packets will sent to the particular destination.particular destination.

Module1Module1

On/offConveyoR

Belt

Cocontroller

Page 13: Problem oriented software engineering01

Module Description 2Module Description 2

Conveyor BeltConveyor Belt

The belt was activated by the controller The belt was activated by the controller

and the packet is generated from the conveyor belt. and the packet is generated from the conveyor belt.

Datas and other jobs such as splitting packets those Datas and other jobs such as splitting packets those

jobs are handled in Conveyor Beltjobs are handled in Conveyor Belt

Page 14: Problem oriented software engineering01

Module2Module2

ConveyorBelt

Reading Station

Packets are sent to reading station

Page 15: Problem oriented software engineering01

Module Description 3Module Description 3

Reading StationReading Station

Packet’s id and destination are Packet’s id and destination are

noted by the reading station and the packets noted by the reading station and the packets

are sent to the other modules.are sent to the other modules.

Page 16: Problem oriented software engineering01

Packets are checked in switchPackets are checked in switch

Reading station

Switch MisroutedDisplay

Destination

yes

Page 17: Problem oriented software engineering01

Module Description 4Module Description 4

SwitchSwitch

Switch will control the loss and lossless Switch will control the loss and lossless

packets and it will sent the packets to the packets and it will sent the packets to the

corresponding destination.corresponding destination.

Page 18: Problem oriented software engineering01

Packets reached to the Packets reached to the

Switch

Dest1

Dest2

Page 19: Problem oriented software engineering01

Use Case Diagram:Use Case Diagram:

user

Controller

Conveyorbelt

ReadingStation

Switch

Page 20: Problem oriented software engineering01

Activity Diagram:Activity Diagram:

controller

conveyorbelt

readingstation

off

on

destination mis route

yes no

Page 21: Problem oriented software engineering01

Class Diagram:Class Diagram:Controller

+Controller()+initComponents()+main()

Conveyor

+initComponents()+jButtonActionPerformed()+main()

Destination

+Destination()+PacketReceiver()+main()

MisRouted

+MisRouted()+main()

ReadingStation

+initComponents()+ReadingStation()

Router

+Router()+main()

Switch

+Switch()+initComponents()+main()

Page 22: Problem oriented software engineering01

CODE:CODE: Controller.javaController.java public class Controller extends javax.swing.JFrame public class Controller extends javax.swing.JFrame {{ public Controller() public Controller() { { initComponents();initComponents(); setSize(400,300);setSize(400,300); setLocation(350,350);setLocation(350,350); } // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents} // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() private void initComponents() {{ jLabel1 = new javax.swing.JLabel();jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel();jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton();jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton();jButton2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); getContentPane().setLayout(null);getContentPane().setLayout(null); jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 18));jLabel1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); jLabel1.setText("Package Router Control Problem");jLabel1.setText("Package Router Control Problem"); jLabel1.setName("jLabel1"); jLabel1.setName("jLabel1"); getContentPane().add(jLabel1);getContentPane().add(jLabel1); jLabel1.setBounds(60, 10, 290, 40);jLabel1.setBounds(60, 10, 290, 40);

Page 23: Problem oriented software engineering01

jLabel2.setName("jLabel2"); jLabel2.setName("jLabel2"); getContentPane().add(jLabel2); getContentPane().add(jLabel2); jLabel2.setBounds(160, 60, 80, 20);jLabel2.setBounds(160, 60, 80, 20); jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 12));jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); jButton1.setText("Start");jButton1.setText("Start"); jButton1.setName("jButton1");jButton1.setName("jButton1"); jButton1.addActionListener(new java.awt.event.ActionListener()jButton1.addActionListener(new java.awt.event.ActionListener() {{ public void actionPerformed(java.awt.event.ActionEvent evt) public void actionPerformed(java.awt.event.ActionEvent evt) { { jButton1ActionPerformed(evt);jButton1ActionPerformed(evt); }} }} getContentPane().add(jButton1);getContentPane().add(jButton1); jButton1.setBounds(100, 140, 90, 27);jButton1.setBounds(100, 140, 90, 27); jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 12));jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 12)); jButton2.setText("Exit"); jButton2.setText("Exit"); jButton2.setName("jButton2");jButton2.setName("jButton2"); jButton2.addActionListener(new java.awt.event.ActionListener()jButton2.addActionListener(new java.awt.event.ActionListener() {{ public void actionPerformed(java.awt.event.ActionEvent evt)public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt);{ jButton2ActionPerformed(evt);

Page 24: Problem oriented software engineering01

}} } } getContentPane().add(jButton2);getContentPane().add(jButton2); jButton2.setBounds(200, 140, 90, 27);jButton2.setBounds(200, 140, 90, 27); pack();pack(); }p}p rivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt)rivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {{ GEN-FIRST:event_jButton1ActionPerformedGEN-FIRST:event_jButton1ActionPerformed Conveyor con=new Conveyor();Conveyor con=new Conveyor(); con.show();con.show(); }} GEN-LAST:event_jButton1ActionPerformedGEN-LAST:event_jButton1ActionPerformed { { public static void main(String args[]) public static void main(String args[]) {{ java.awt.EventQueue.invokeLater(new Runnable()java.awt.EventQueue.invokeLater(new Runnable() { public void run(){ public void run() {{ new Controller().setVisible(true);new Controller().setVisible(true); }} }); }); } // Variables declaration - do not modify//GEN-BEGIN:variables} // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1;private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1;private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2;private javax.swing.JLabel jLabel2; // End of variables declaration//GEN-END:variables// End of variables declaration//GEN-END:variables }}

Page 25: Problem oriented software engineering01

AdvantagesAdvantages

In this system they are considering both formal In this system they are considering both formal aspects and non-formal aspects, so we can find aspects and non-formal aspects, so we can find the solution of the given problem.the solution of the given problem.