Company Name Starts with ...
#  A  B  C  D  E   F  G  H  I  J   K  L  M  N  O   P  Q  R  S  T   U  V  W  X  Y  Z

  • Cap Gemini aptitute test questions (31)
  • Cap Gemini interview questions (1114)
  • Cap Gemini placement papers (1)
  • Cap Gemini technical test questions (47)



Cap Gemini Selenium Interview Questions
Questions Answers Views Company eMail

in real time , which framework is used ? is it datadriven or keyword or hybrid ?? please answer

2 5067

Post New Cap Gemini Selenium Interview Questions



Un-Answered Questions

What's the difference in HTML AJAX, ASP.Net AJAX?

1402


what is class module in vb6? what it's use? with example..

1242


How we will test ubercate

763


Question 1 [8] Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram. 6 Question 2 [10] The following program reads data (details of students) from a file named students.txt and converts it into e-mail addresses. The results are written to a file named studentemail.txt. students.txt consists of a number of lines, each containing the data of a student in colon delimited format: Last Name:First Name:Student Number Each input record is converted to an e-mail address and written to studentemail.txt in the following format: the first character of the last name + the first character of the first name + the last four digits of the student number + “@myunisa.ac.za” import java.io.*; public class EmailConverter { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new FileReader ("students.txt")); PrintWriter output = new PrintWriter(new FileWriter ("studentemail.txt")); String line = input.readLine(); while (line != null) { // Extract the information for each student String[] items = line.split(":"); // Generate the email address String email = "" + items[0].charAt(0) + items[1].charAt(0) + items[2].substring(4,8) + "@myunisa.ac.za"; email = email.toLowerCase(); // Output output.println(email); line = input.readLine(); } input.close(); output.close(); } } Rewrite the class so that it handles possible errors that may occur. In particular, it should do the following: • It should catch at least three appropriate exceptions that might occur, and display suitable messages. • At this stage, the program will not run correctly if there is an empty line in the input file. Change the program so that if an empty line is encountered, an exception is thrown and the empty line is ignored. This exception should be handled with the display of a suitable error message. • Before the e-mail address is added to the output file, check if the student number has 8 digits. If not, throw an InvalidFormatException (which the program should not handle itself). COS2144/102 7 Question 3 [12] 3.1 Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2) 3.2 Consider the following class: public class Point { protected int x, y; public Point(int xx, int yy) { x = xx; y = yy; } public Point() { this(0, 0); } public int getx() { return x; } public int gety() { return y; } public String toString() { return "("+x+", "+y+")"; } } Say you wanted to define a rectangle class that stored its top left corner and its height and width as fields. 3.2.1 Why would it be wrong to make Rectangle inherit from Point (where in fact it would inherit the x and y coordinates for its top left corner and you could just add the height and width as additional fields)? (1) 8 Now consider the following skeleton of the Rectangle class: public class Rectangle { private Point topLeft; private int height, width; public Rectangle(Point tl, int h, int w) { topLeft = tl; height = h; width = w; } public Rectangle() { this(new Point(), 0, 0); } // methods come here } 3.2.2 Explain the no-argument constructor of the Rectangle class given above. 3.2.3 Write methods for the Rectangle class to do the following: • a toString() method that returns a string of the format "top left = (x, y); height = h; width = w " where x, y, h and w are the appropriate integer values. • an above() method that tests whether one rectangle is completely above another (i.e. all y values of the one rectangle are greater than all y values of the other). For example, with the following declarations Rectangle r1 = new Rectangle(); Rectangle r2 = new Rectangle(new Point(2,2), 1, 4); the expression r2.above(r1) should give true, and r2.above (r2) should give false. (You can assume that the height of a rectangle is never negative.) (2) (5) Question 4 [8] 4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (4) COS2144/102 9 Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2) Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situations (in general) would you use a HashSet to store a collection of values? (3) 6.3 Name three software design patterns (besides the Strategy pattern) that are covered in the syllabus of COS2144. (3) Question 7 [8] Consider the following class and answer the questions below it: public class StackWithGuard extends Stack { public StackWithGuard(int size) { super(size); } synchronized public boolean isEmpty() { return super.isEmpty(); } synchronized public boolean isFull() { return super.isFull(); } synchronized public int getSize() { return super.getSize(); } synchronized public void push(Object obj) { try { while (isFull()) { wait(); } } catch (InterruptedException e) {} super.push(obj); COS2144/102 11 notify(); } synchronized public Object pop() { try { while (isEmpty()) { wait(); } } catch (InterruptedException e) {} Object result = super.pop(); notify(); return result; } public static void main(String args[]) { StackWithGuard stack = new StackWithGuard(5); new Producer(stack, 15).start(); new Consumer(stack, 15).start(); } } Note: The Stack class is provided in the Appendix. Note also: The following questions all refer to the pop() method of the StackWithGuard class given above. 7.1 What does the synchronized keyword ensure for this method? (2) 7.2 Why is a while loop used to test whether the stack is empty? In other words, why wouldn't the following if statement be sufficient? if (isEmpty()) { wait(); } (2) 7.3 Why is the result of popping (provided by the inherited pop() method) stored in a temporary variable? In other words, why wouldn't the following statement be sufficient? return super.pop(); (2) 7.4 Why is the while loop placed in a try-catch structure? (2) Appendix The LinkedQueue class: public class LinkedQueue implements Queue { private Node first, last; private int count; public LinkedQueue() { first = last = null; count =0; } public int size() { return count; } public boolean isEmpty() { return (count == 0); 12 } public void enqueue(Object o) { Node node = new Node(); node.element = o; node.next = null; node.prev = last; if (last != null){ last.next = node; } else { last = first = node; } last = node; count++; } public void dequeue() { if ((first!= null) & (first.next!=null)) { first = first.next; first.prev = null; count--; } else { first = last = null; count--; } } public Object front() { return first; } } class Node { Object element; Node next, prev; } The Stack class: public class Stack { protected Object rep[]; protected int top = -1; protected int size = 0; protected int count = 0; public Stack(int size) { if (size > 0) { this.size = size; rep = new Object[size]; } } public boolean isFull() { return (count == size); } public boolean isEmpty() { return (count == 0); } public int getSize() { return size; } public void push(Object e) { if (e != null && !isFull()) { COS2144/102 13 top++; rep[top] = e; count ++; } } public Object pop() { Object result = null; if (!isEmpty()) { result = rep[top]; top--; count--; } return result; } }

1566


what is the difference between capital budgeting and working capital management?

2801






mix design procedure for 1:6 cement mortar

986


What is Gradient filters?

357


we have a situation where i am about to design one process where only maintainence is taken care of keeping the existing product +services process intact ...Do you know how do i proceed???? where this process is a VAT free

769


Dear sir, iam completed iti ncvt electrician 2000-2002 & diploma electrical eng completed 2008-2010 distance education in rvd university, still i got B licences only but my working company want C licences, how to i get c licencese pls reply me iam in critical situation thank you karthick 9841637803

587


what is your technique of selling? How do u manage distributor? How do u manage stock in SS?

1143


difference between  ejb,struts,hibernate,spring and jsp

1372


For a high pressure/ high temperature multistage pump (Boiler Feed Water Pump), what is the average life of mechanical seal? Does life of DE and NDE differ, if differ, how much? Why?

877


Which one you will use to implement critical section?

1062


What will be the size of copper cable (each for 3 phase and 1 neutral) from Service connection Kit-Kat to Panel Board (i.e. to main switch) for a 6 pole 3-phase AC induction motor of 200 H.P. capacity? Amp-255 A, Frequency:- 1450 rpm.

825


COL1,COL2 ABC,1 XYZ,2 HERE IN COL2 VALUES 1,2 NOT STSANDARD(IE MEANS NOT FIXED VALUES LIKE OTHER SOME VALUES LIKE 10,20) O/P IS COL1,COL2 ABC,2 XYZ,1

865






Cap Gemini Selenium Interview Questions
  • Software (1)
  • C (2)
  • OOPS (2)
  • C++ General (1)
  • COM DCOM (2)
  • VC++ AllOther (1)
  • Programming Languages AllOther (2)
  • CGI Perl (1)
  • VB Script (10)
  • Shell Script (4)
  • UDP (1)
  • Networking AllOther (1)
  • Visual Basic (1)
  • C Sharp (1)
  • ASP.NET (6)
  • Crystal Reports (1)
  • BizTalk (1)
  • Dot Net Framework (3)
  • Dot Net AllOther (1)
  • Exchange Server (1)
  • Oracle General (9)
  • Database Management (2)
  • Forms Reports (1)
  • Oracle AllOther (4)
  • SQL Server (18)
  • MySQL (1)
  • DB Administration (2)
  • SQL PLSQL (15)
  • Databases AllOther (1)
  • Linux AllOther (1)
  • Unix Commands (3)
  • Unix General (4)
  • Unix AllOther (2)
  • Solaris AllOther (3)
  • Operating Systems General Concepts (1)
  • WinRunner (1)
  • Load Runner (3)
  • QTP (40)
  • Test Director (1)
  • Selenium (1)
  • Automation Testing AllOther (1)
  • Manual Testing (84)
  • QA Concepts (15)
  • Mobile Testing (1)
  • Test Cases (7)
  • Test Documents Reporting (1)
  • Testing AllOther (19)
  • COBOL (21)
  • JCL (16)
  • CICS (14)
  • DB2 (31)
  • IMS (2)
  • Natural (1)
  • MVS (1)
  • VSAM (5)
  • RPG400 (8)
  • COBOL400 (1)
  • DB400 (3)
  • Core Java (17)
  • Advanced Java (5)
  • Swing (1)
  • Struts (2)
  • JDBC (1)
  • Weblogic (2)
  • Java J2EE AllOther (4)
  • Java Related AllOther (4)
  • MQSeries (2)
  • Middleware AllOther (1)
  • SOAP (1)
  • Teradata (9)
  • Business Objects (18)
  • Cognos (24)
  • Informatica (68)
  • Ab Initio (2)
  • Data Stage (20)
  • SAS (3)
  • ETL (4)
  • Data Warehouse General (2)
  • HR Questions (5)
  • WiFi Security (1)
  • SAP Basis (27)
  • SAP ABAP (110)
  • SAPScript (3)
  • SAP SD (96)
  • SAP MM (22)
  • SAP PP (2)
  • SAP FI CO (66)
  • SAP HR (27)
  • SAP CRM (55)
  • SAP APO (1)
  • SAP Business Warehouse (9)
  • SAP Security (24)
  • SAP Netweaver (1)
  • SAP ALE IDocs (2)
  • SAP B1 (1)
  • SAP Business Objects BO BOBJ (1)
  • CRM General (1)
  • Siebel (14)
  • Oracle Apps Technical (11)
  • Oracle Apps Financial (19)
  • Oracle Apps Manufacturing (1)
  • Oracle Apps HRMS (1)
  • Oracle Apps SCM (6)
  • WebMethods (10)
  • TIBCO (1)
  • Mechanical Engineering (2)
  • Electrical Engineering (4)
  • Electronics Communications (2)
  • Engineering AllOther (3)
  • Marketing Sales (2)
  • Banking Finance (3)
  • Audit (2)
  • Taxation (3)
  • Accounting General (15)
  • Accounting AllOther (15)
  • Call Centre AllOther (3)
  • BSRB AllOther (1)
  • Law AllOther (1)
  • Everything Else AllOther (1)
  • English (2)
  • General Aptitude (24)
  • Placement Papers (1)
  • CCNA (1)
  • Sun Certifications (1)
  • Certifications AllOther (1)
  • H1B Visa (2)
  • USA Student Visa F1 Visa (1)
  • L1 Visa (2)
  • USA Business Visa B1 Visa (1)
  • USA Dependent Visa H4 Visa (2)
  • C Code (1)
  • Programming Code AllOther (1)
  • Oracle Errors (1)
  • MySQL Errors (1)