Posts

Showing posts with the label BSc CSIT 7th Semester

Suppose of you have purchased 500 pieces of pants for Rs 800 per piece . You would then sell the pants to a store for Rs 1000 per piece, Rs 1500 is incurred as a transportation cost. Calculate ROI.

 No. of pants=500 the cost price of 1 pant= Rs 800 The cost price of 500 pants = Rs 800*500 = 400000 Transportation cost = Rs 1500 Total investment = CP + Transportation cost                            = 400000 + 1500 = Rs 401500 S.P of 1 pant = Rs 1000 S.P of 500 pant = Rs 1000*500 = Rs 500000 Profit = S.P - Total investment             = 500000 - 401500 = Rs 98500 Now, ROI =( Profit/Total investment ) *100%         = (98500/401500)*100%        = 24.53%

How can priorities be set in deciding the levels of monitoring?

 Priorities can be set up in deciding the levels of monitoring in the following ways:- Critical Path activities Any delay in an activity on the critical path will cause a delay in the completion date for the project. Critical path activities are likely to have a very high priority for close monitoring. Activities with no free float   A delay in any activity with no free float will delay at least some subsequent activities even though if the delay is less than the trial float, it might not delay the project completion date. Free float is the amount of time an activity may be delayed without affecting any subsequent activity. High-risk activities A set of high-risk activities should be identified as part of the initial risk profiling exercise. If we are using the PERT three-estimate approach we will designate as high-risk activities duration varianceThese activities will be given close attention because they are most likely to overrun or overspend. Activities using critical...

Short note on Uniform Gradient Cash Flow and PERT

 Uniform Gradient Cash Flow If the cash flow has the proper form its present worth can be determined by using the uniform gradient factor(P=G(P/G, i, n). The uniform gradient factor finds the present worth a uniformly increasing cash flow. For example, if the cash flow in period 1 is 2000 and in period 2 is 2100. it would be uniform if the subsequent amounts increased by 100 in each subsequent period. This gradient in this example would be equal to 100. PERT A PERT chart is a project management tool that provides a graphical representation of a project's timeline. The Program Evaluation Review Technique (PERT) breaks down the individual tasks of a project for analysis. PERT charts are considered preferable to Gantt charts in some cases because they identify task dependencies, but they're often more difficult to interpret. A PERT chart allows managers to evaluate the time and resources necessary to manage a project. the Project Evaluation Review Technique, or PERT, is used to id...

What is the importance of software quality? Explain CMM.

Image
The importance of software quality is:-   Increasing criticality of the software  The final customer or user is naturally anxious about the general quality of software, especially its reliability. This is increasingly the case as organizations become more dependent on their computer systems and software is used more and more in areas that are safety-critical, for example, to control aircraft.  The intangibility of software  This makes it difficult to know that a particular task in a project has been completed satisfactorily. The results of these tasks can be made tangible by demanding that the developer produce 'deliverables' that can be examined for quality. Accumulating errors during software development  As computer system development is made up of a number of steps where the output from one step is the input to the next, the errors in the earlier deliverables will be added to those in the later steps leading to an accumulating detrimental effect. In gen...

What is the significance of float ?How can CPM play important role in scheduling?

Significance of float on project management are:- It ensures projects stay on track.  Monitoring the total float of a project can help project managers determine whether a project is on track. It can also help them determine what tasks they can delay and how they can adjust their schedule to ensure they meet their project deadline. It improves teamwork and collaboration.  Understanding what the total float of a project is can provide teams with a clear schedule that makes it easy for them to collaborate. This can improve productivity and morale. It makes it easier to prioritize tasks.  Project managers can use float to outline each phase of a project and determine the order their team needs to complete tasks. This can help them delegate tasks more effectively and improve communication. It can decrease stress.  Calculating float time can decrease stress because it helps you identify how flexible you can be with the deadline for a specific task. This can assure you tha...

Explain the process of software configuration management.

 Software Configuration Management (SCM)  Software Configuration Management (SCM) refers to a process for maintaining computer systems, servers, and software in a desired, consistent state.  Sometimes called software change management or IT automation, the idea is to have a system in place to track and compare changes made across a system throughout the development process and also identify who made these revisions. The purpose is to make project management easier, minimize errors, increase traceability, and improve overall software quality.  The software configuration management process is a series of steps designed to track and manage all the defects, resources, codes, documents, hardware, and budgets throughout a project. SCM is an interdisciplinary process involving people at every level, including DevOps, developers, project managers/owners, SysAdmin, and testers.  The 5 steps of an SCM plan 1. Planning and Identification 2. Version Control and Baseline 3. ...

Difference between work break down structure and product break down structure with an example.

Image
 Work break down structure  Work breakdown structure is a visual, hierarchical, and deliverables-oriented deconstruction of a project. A WBS includes dividing a large and complex project into a simpler manageable and independent task. The root of this tree (structure) is labeled by the project name itself. For constructing a WBS, each node is recursively decomposed into smaller sub-activities until at the leaf level the activities become undividable and independent, It follows a top-down approach. WBS is the method for time scheduling cost estimation and error handling. Example:- Product breakdown structure The product breakdown structure is a hierarchical structure of things that the project will make or outcomes that it will deliver, It begins with the final product at the top of the hierarchy followed by the sub-categories element of the product. the product breakdown structure is similar to the work breakdown structure. The PB is supported by a product log and associated p...

Difference between software project management and other types of project management. Briefly explain project management life cycle.

 The differences between software project management and other types of project management are given below:- 1. Software projects are based on logical work, Other types of projects are based on physical work. 2. We can't measure the complexity of software projects, We actually work on other types of projects. 3. There is no fixed production plan, difficult to monitor and track., There is a fixed production plan that can be tracked. 4. Productivity varies greatly with changes in technology or worker., The Productivity does not vary much 5. Managing a software project is more about managing interpersonal communication and less administration ., It is more about maintaining a schedule and good administration. The phases of the project management life cycle are explained below:- Project initiation Project planning Project execution Project monitoring and performance Project closure 1. Initiation Phases This is where we can define what the project actually is we can outline our objectiv...

List three main types of risk. Explain Boehm's risk categories task breakdown structure . Briefly explain the categories of factors that need to be considered while risk identification.

Image
 Risk:  Risk is a problem that could cause some loss or threaten the progress of the project, but this has not happened yet. These potential issues might harm the cost, schedule, or technical success of the project and the quality of our software device, or project team morale. A risk is an uncertain event or condition that, if occurs, has a negative on a project's objective.  The objective of risk management is to avoid or minimize the adverse effect of unforeseen events by avoiding the risk of drawing up contingency plans for dealing with them. The above figure shows a task breakdown structure of Barry Boehm:- Risk identification consists of a listing of all the risks that can adversely affect the successful execution of the project. Risk estimation consists of assessing the likelihood and impact of each hazard. Risk evaluaton consss of rank9ing the rsik  an d detemining risk aversion stragteigies. Risk planning consists of drawing up contingency plans and where ap...

Why is planning is necessary ?Highlight on the steps of activity planning.

Image
 Planning is necessary because:- IT boosts project performance and success rates. It saves money It improves team communication. IT ensures the best use of resources. The steps of activity planning are given below:- Set up activities Define the relationship between activities Estimate resources required for performing activities Estimate durations for activities Step 1: Set up activities The first step of project activities planning and scheduling requires the project manager to define what amount of actons and tasks are necessary for producing project deliverables in a timely manner. The input for his process will be the project deliverables statement. The project managers can use this document to define high-level activities that will be used later in creating the project implementation schedule. The project managers should also work on developing project activities templates that helps simplify the process of project scheduling and planning. Step 2: Define Relationship The next ...

When thread synchronization is necessary ? Explain with suitable example.

 Java Thread synchronization is necessary when we want to allow only one thread to access the shared resource. So Synchronization in Java gives the capability to control the access of multiple threads to any shared resource. //example of java synchronized method class Table{ synchronized void printTable(int n){//synchronized method for(int i=1;i<=5;i++){ System.out.println(n*i); try{ Thread.sleep(400); }catch(Exception e){System.out.println(e);} } } } class MyThread1 extends Thread{ Table t; MyThread1(Table t){ this.t=t; } public void run(){ t.printTable(5); } } class MyThread2 extends Thread{ Table t; MyThread2(Table t){ this.t=t; } public void run(){ t.printTable(100); } } public class TestSynChronization{ public static void main(String args[]){ Table obj = new Table();//only one object MyThread1 t1=new MyThread1(obj); MyThread2 t2=new MyThread2(obj); t1.start(); t2.start(); } }

How CORBA differs from RMI ? Discuss the concepts of IDL briefly.

  The difference between COBRA & RMI are as follows:-  COBRA CORBA has an implementation for many languages. It uses Interface Definition Language (IDL) to separate interface from implementation. CORBA objects are not garbage collected because it is language independent and some languages like C++ do not support garbage collection. CORBA does not support this code-sharing mechanism. CORBA passes objects by reference. CORBA is a peer-to-peer system. CORBA uses Internet Inter-ORB Protocol as its underlying remoting protocol. The responsibility of locating an object implementation falls on the Object Adapter either Basic Object Adapter or Portable Object Adapter. RMI RMI is a Java-specific technology. It uses a Java interface for implementation. RMI objects are garbage collected automatically.    RMI programs can download new classes from remote JVMs. RMI passes objects by remote reference or by value. Java RMI is a server-centric model. RMI uses the Java ...

What are different ways of writing servlet programs ? Write a sample Servlet program using any one way.

   Writing Servlets Program There are three ways to create the servlet 1. By implementing the Servlet interface 2. By inheriting the GenericServlet class 3. By inheriting the HttpServlet class 1.  By implementing the Servlet interface/ Servlet Interface The Servlet interface provides common behavior to all the servlets. The servlet interface needs to be implemented for creating any servlet (either directly or indirectly). It provides 3 life cycle methods that are used to initialize the servlet, service the requests, and destroy the servlet, and 2 non-life cycle methods that are used to get servlet information and servlet configurations. Example import java.io.*; import javax.servlet.*; public class ServletInt implements Servlet { ServletConfig config=null; public void init(ServletConfig config) { this.config=config; System.out.println("servlet is initialized"); } public void service(ServletRequest req, ServletResponse res) throws IOException, ServletException { res.setCon...

How JavaFX differs from Swing ? explain steps of creating GUI using JavaFX.

  JavaFX vs. SWING Swing, AWT, and JavaFX all are a part of JDK and are used to create Graphical User Interface (GUI) with JavaFX being one of the latest entrants in this list. Key differences between JavaFX and Swing are provided below. Swing 1. Swing is the standard toolkit for Java developers in creating GUI 2. Swing has a more sophisticated set of GUI components 3. Swing is a legacy library that fully features and provides pluggable UI components 4. Swing has a UI component library and acts as a legacy 5. Swing does not have support for customization using CSS and XML 6. With Swing, it is very difficult to create beautiful 3-D applications. JavaFX 1. JavaFX provides platform support for creating desktop applications. 2. JavaFX has a decent number of UI components available but lesser than what Swing provides. 3. JavaFX has UI components that are still evolving with a more advanced look and feel. 4. JavaFX has several components built over Swing 5. JavaFX has support for customi...

What causes SQL exception ? How it can be handled ? Explain with example.

 SQL exceptions can occur either if the driver is missing or information about the database is wrong or the SQL query is wrong. SQL exception can be handled by utilizing the information available from the Exception object, which can be caught with an exception. Example import java.sql.*; public class DemoSQLException { static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; static final String DB_URL = "jdbc:mysql://localhost/emp"; static final String user = "root"; static final String pass = "$Arjun12"; public static void main(String[] args) { Connection connection = null; PreparedStatement statement = null; try { Class.forName(JDBC_DRIVER); connection = DriverManager.getConnection(DB_URL, user, pass); Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery("select employee"); //Invalid SQL Statement while (rs.next()) System.out.println(rs.getInt(1) + " " + rs.getString(2) ); connection.close(); } c...

What is the use of action command in event handling ? Explain with example.

Action command is used to handle event caused by the Buttons. Example  import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class ActionDemo extends JFrame implements ActionListener { JLabel l1, l2, l3; JTextField t1, t2, t3; JButton b1, b2; public ActionDemo() { super("Handling Action Event"); l1 = new JLabel("Click on button to get result"); t1 = new JTextField(20); b1 = new JButton("Demo Button"); b1.addActionListener(this); setLayout(new FlowLayout(FlowLayout.CENTER, 150, 10)); add(l1); add(t1); add(b1); setSize(400, 300); setVisible(true); } public void actionPerformed(ActionEvent actionEvent) { String str = actionEvent.getActionCommand(); //using action command t1.setText("You have clicked " + str); } public static void main(String[] args) { new ActionDemo(); } } In the above example if clicked on the Demo Button, with the help of the getActionCommand() method we will be ab...

What are layout managers? Explain Gridbag layout with suitable example.

Image
  A layout manager   A layout manager is an object that controls the size and position of the components in the container. Every container object has a layout manager object that controls its layout. Actually, layout managers are used to arranging the components in a specific manner.  It is an interface that is implemented by all the classes of layout managers.  There are some classes that represent the layout managers.  The LayoutManagers are used to arrange components in a particular manner. The Java LayoutManagers facilitate us to control the positioning and size of the components in GUI forms. LayoutManager is an interface that is implemented by all the classes of layout managers. Some of the most commonly used layout managers of java are : Flow Layout Border Layout Grid Layout Gridbag layout Card Layout Group Layout G ridbag layout The Gridbag Layout is a flexible layout manager that aligns components vertically and horizontally, without requiring that...

Write a java program that writes objects of Employee class in the file named emp.doc. Create Employee class as of you interest.

 import java.io.*; class Employee implements Serializable { private String name; private int age; public Employee(String name, int age) { this.name = name; this.age = age; } @Override public String toString() { return "Name:" + name + " Age:" + age; } } class RWObject { public static void main(String[] args) { Employee employee1 = new Employee("Arjun", 20); Employee employee2 = new Employee("Ram", 20); try { FileOutputStream fileOutputStream = new FileOutputStream("emp.doc"); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); //Write object to file objectOutputStream.writeObject(employee1); objectOutputStream.writeObject(employee2); objectOutputStream.close(); fileOutputStream.close(); FileInputStream fileInputStream = new FileInputStream("emp.doc"); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); //Read Objects Employee employee = (Employee) objectInputStream.readOb...

Discuss various scopes of JSP objects briefly. Create HTML File with principal, time and rate. Then crate a JSP file that reads values from the HTML form, calculates simple interest and displays it.

   SCOPE OF JSP OBJECTS The availability of a JSP object for use from a particular place of the application is defined as the scope of that JSP object. Every object created on a JSP page will have a scope.  Object scope in JSP is segregated into four parts and they are page, request, session, and application. a) Page Scope- page scope means, the JSP object can be accessed only from within the same page where it was created. JSP implicit objects out, exception, response, pageContext, config, and page have page scope. //Example of JSP Page Scope <jsp:useBean id="employee" class="EmployeeBean" scope="page" /> b) Request Scope-  A JSP object created using the request scope can be accessed from any pages that serves that request. More than one page can serve a single request. Implicit object request has the request scope. //Example of JSP Request Scope <jsp:useBean id="employee" class="EmployeeBean" scope="request" /> c...

Write a java program to create login with user id, password, ok button, and cancel button. Handle key events such that pressing 'l' performs login and pressing 'c' clears text boxes and puts focus on user id text box. Assume user table having fields Uid and Password in the database named account. (10)

LoginFrame.java  import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.sql.SQLException; /** * JFrame to handle key events such that pressing 'l' performs login, * ... and pressing 'c' clears text fields and puts focus on user ID * ... text field. */ public class LoginFrame extends JFrame { JLabel userIdLabel, passwordLabel; JTextField userIdTextField; JPasswordField passwordField; JButton okBtn, cancelBtn; JFrame self; public LoginFrame() { self = this; userIdLabel = new JLabel("User ID"); passwordLabel = new JLabel("Password"); userIdTextField = new JTextField(20); passwordField = new JPasswordField(20); okBtn = new JButton("OK"); cancelBtn = new JButton("Cancel"); okBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { new JFrame() { { JLabel messageLabel = new JLabel(); LoginService loginService = new LoginService(); String user = userIdTextField.getText(); ...