Posts

Showing posts with the label Model Question

What is distributed database? Explain data fragmentation techniques in detail with suitable example.

Image
Distributed database (DDB)  A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (DDBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users. The distributed database (DDB) and distributed database management system (DDBMS) together are called Distributed database systems (DDBS). Data Fragmentation Fragmentation is the task of dividing a table into a set of smaller tables. The subsets of the table are called fragments. These fragments may be stored at different locations. Moreover, fragmentation increases parallelism and provides better disaster recovery. Fragmentation can be of three types: Vertical Fragmentation Horizontal Fragmentation Hybrid Fragmentation Fragmentation should be done in a way so that the original table can be reconstructed from the fragments. This is needed so that the original ta

Explain enhanced entity relationship model in detail. What is aggregation?

Image
 EER Model EER is a high-level data model that incorporates the extensions to the original ER model. It is a diagrammatic technique for displaying the following concepts Sub Class and Super Class Specialization and Generalization Union or Category Aggregation These concepts are used when they come in the EER schema and the resulting schema diagrams are called EER Diagrams. Features of the EER Model EER creates a design more accurate to database schemas. It reflects the data properties and constraints more precisely. It includes all modeling concepts of the ER model. The diagrammatic technique helps in displaying the EER schema. It includes the concept of specialization and generalization. It is used to represent a collection of objects that is the union of objects of different entity types. A. Sub Class and Super Class Sub-class and Super class relationships lead to the concept of Inheritance. The relationship between sub-class and superclass is denoted by the symbol. 1. Super Class Su

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 resources Act

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 general, the later in a

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 that as long as you co

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. Change Control 4. Config

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 product de

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 appropriate addin

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 step

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 Remote Method Proto

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.setContent

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 customizati

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 the components be of the sam

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