Draw up a skeleton of a crisis management plan that would assist Shell Petroleum in dealing
with the Public Relations issue they face and make recommendations on how they could
improve dealing with this issue in the future.
Which of the following is TRUE about disaster?
A. It is caused by a natural phenomenon only.
B. It causes destruction to limited parts of the community.
C. It causes mental terror and physical threat to selected people.
Three airlines serve a Srinagar. Airline ‘Amira’ has 50% of all the scheduled flights, airline ‘Biyas’ has 30%, and airline ‘chinar’ has the remaining 20%. Their on-time rates are 80%, 65%, and 40%, respectively.
Part 1) Draw the Probability tree diagram. (Note: You may use any software for this, like MS paint, MS office, etc.)
Part 2) A plane has just left on time. What is the probability that it was airline ‘Amira’?
Prove that the complete disjunctive normal form and complete conjunctive normal form in three variables in a Boolean algebra is equal to the unit and zero element of the Boolean algebra.
Question 3: (Inheritance)
Create an abstract class called Employee that has an abstract method call computePay() which
computes the total pay per employee using the rate per hour = $50. The method should accept
the number of hours the employee has worked. Create a child class called employeeChild and
provide the implementation. In the main method invoke that method and get the number of hours
worked from the user and pass it to the called method.
Question 2 (Polymorphism)
Mathematically, the area of a rectangle is computed as length * width, the area of a circle is
computed as pi*radius*radius. Given that pi = 3.14, write a Java program with an overloaded
method called getArea() that can compute for the area of a circle or rectangle depending on the
parameters supplied. Illustrate how you will invoke the method in the main method for the two
scenarios.
You’re working on a search engine. Watch your back Google!
The given code takes a text and a word as input and passes them to a function called search().
The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not.
Sample Input
"This is awesome"
"awesome"
Sample Output
Word found
Develop a Python application that will randomly select n integers from 1 to 45 without repetitions.
Sample Output 1:
How many numbers? 6 6 randomly selected nos. [21, 35, 16, 36, 5, 8]
Question 1: (Inheritance)
Consider a scenario where you have been given three classes, namely Vehicle, Bus, and
School_Bus. The School_Bus class is supposed to inherit all characteristics of both the Vehicle
and the Bus class. Explain and illustrate how you are going to achieve this considering you are using Java programming language.
Solve the following problem by showing the design of your solution as an algorithm.
The problem – The program will take two integers from the user, say n1 and n2. It will then print the sum of all numbers between n1 and n2, inclusive. For example, if the user enters 5 and 9, the program will print the value of 5+6+7+8+9. On the other hand, if the user enters 5 and -2, the program will print the value of 5+4+3+2+1+0+(-1)+(-2). Note: Do not assume the user will always enter the smaller number first.